Unable to upgrade to gitlab-ce 13.0 in Ubuntu 20.04

Hi, I am upgrading my Gitlabs installation after I found out the automatic update has been failing.

I have a dedicated server running Ubuntu 20.04 focal, with Gitlab-ce 12.10.14. installed from sources via apt.

> apt-get install gitlab-ce=13.0.0-ce.0
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Version '13.0.0-ce.0' for 'gitlab-ce' was not found

Is failing.

Then I found instruction toe download the package and install from package.
wget https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/bionic/gitlab-ce_13.0.0-ce.0_amd64.deb
And install as:
> dpkg -i gitlab-ce_13.0.0-ce.0_amd64.deb
dpkg-deb: error: ‘gitlab-ce_13.0.0-ce.0_amd64.deb’ is not a Debian format archive
dpkg: error processing archive gitlab-ce_13.0.0-ce.0_amd64.deb (–install):
dpkg-deb --control subprocess returned error exit status 2
Errors were encountered while processing:

Which fails to. I am stuck. It seems like the upgrade to version 13 is not supported in Ubuntu Focal. What can I do?

Thanks, Frank

I think you need to change the repository source to use focal (20.04) instead of bionic(18.04)

sudo sed -i 's/bionic/focal/g' /etc/apt/sources.list.d/gitlab_gitlab-ce.list &&
sudo apt update
1 Like

Sorry, should have mentioned it. I have:

# this file was generated by packages.gitlab.com for
# the repository at https://packages.gitlab.com/gitlab/gitlab-ce

deb https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ focal main
deb-src https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ focal main

It turns out the oldest version available in the repos for focal is 13.2.0. So I reverted the gitlab to bionic:

deb https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ bionic main
deb-src https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ bionic main

To my surprise, the upgrade to 13.0.0 has just finished without problems. I can now go further to upgrade it to the latest. And switch it to focal when I get to 13.2.0.

Thanks for sparking this unconventional, illogical idea.

Be careful about what you write, “installed from sources via apt” can be interpreted in (at least) two ways, that result in configurations that are not compatible:

1. You installed from sources - gives different paths
2. You installed the omnibus packages with apt - no sources involved

Everything suggests you’ve actually went with option number 2.

If you’ve followed the (intention of - as the guide instructs you to do seriously inseure things, I recommend against following it literally) guide, you should have ended up having the bionic repository configured. And if you had then kept your GitLab upgraded you probably wouldn’t have encountered this issue.

It might seem a little illogical, but what they have done makes a lot of sense, and putting older versions in the focal repository would mostly be work for the sake of the work.

1 Like