Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
1 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
Need to get 0 B/680 MB of archives.
After this operation, 145 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 319765 files and directories currently installed.)
Preparing to unpack .../gitlab-ce_12.2.0-ce.0_amd64.deb ...
gitlab preinstall: It seems you are upgrading from 11.x version series
gitlab preinstall: to 12.x series. It is recommended to upgrade
gitlab preinstall: to the last minor version in a major version series first before
gitlab preinstall: jumping to the next major version.
gitlab preinstall: Please follow the upgrade documentation at https://docs.gitlab.com/ee/policy/maintenance.html#upgrade-recommendations
gitlab preinstall: and upgrade to 11.11 first.
dpkg: error processing archive /var/cache/apt/archives/gitlab-ce_12.2.0-ce.0_amd64.deb (--unpack):
 new gitlab-ce package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

The error message is self-explanatory. Upgrade your instance to Gitlab CE 11.11 first. Then upgrade to 12 series.

Start by installing it:

sudo apt-get install gitlab-ce=11.11.8-ce.0

This is the latest 11.11 release version. THEN, once you've upgrade to this normally

sudo apt-get upgrade

and everything works, upgrade to version 12:

  • Just went to this situation with my server. Ended with sudo apt-get install gitlab-ce=11.11.8-ce.0 as it is more convenient. And then upgraded to 12.2 with usual sudo apt upgrade. – N0rbert Aug 27 at 12:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.