gitlab: how to update to latest minor version

salvob picture salvob · Sep 10, 2018 · Viewed 13.5k times · Source

I tried to update my gitlab-CE from 10.3.2 to the latest one (currently the 11.4). And it gives me this honestly safe error.

[...]
gitlab preinstall: It seems you are upgrading from 10.x version series
gitlab preinstall: to 11.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 10.8 first.
dpkg: error processing archive /var/cache/apt/archives/gitlab-ce_11.2.3-ce.0_amd64.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/gitlab-ce_11.2.3-ce.0_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

root@this-vm# apt-cache policy gitlab-ce | grep Installed
  Installed: 10.3.2-ce.0

But how to install to the latest minor version ? The documentation they are referring to, doesn't say how to do it. Do you guys encounter any problem like this ?

Answer

ggagliano picture ggagliano · Sep 11, 2018

Try to update to the latest minor version as suggested here:

apt-get update
apt-get install gitlab-ce=<YOUR-LATEST-MINOR-VERSION>-ce.0
gitlab-ctl reconfigure
gitlab-ctl restart

In your case latest minor is: 10.8.6 [as of today].

You can check the release list. Remember to check the changes between your initial and target versions.