Upgrade path followed, sources not found for CE

Hi,
Not sure if I’m making a newbie mistake; I seem to have RTFM but may have overlooked something.
Running 14.8.2, trying to get to the latest 15* version for features and security reasons, but:

  • Direct upgrades gives the warning/error about skipping major versions, which makes sense.
  • When trying to get the correct path from Upgrading GitLab | GitLab (EE but same for CE ?), so launching
sudo apt install gitlab-ce=14.9.5

gives

E: Version ‘14.9.5’ for ‘gitlab-ce’ was not found

Also tried

sudo apt-cache madison gitlab-ee

which gives

me@ip-xxx:/var/opt/gitlab/backups# sudo apt-cache madison gitlab-ee
 gitlab-ee | 14.8.2-ee.0 | https://packages.gitlab.com/gitlab/gitlab-ee/ubuntu bionic/main amd64 Packages

Would that be because the underlying OS has to be upgraded ? Running

NAME="Ubuntu"
VERSION="18.04.6 LTS (Bionic Beaver)"

Nothing else on that server as it is an AWS VM dedicated to GitLab, but no side effect to expect ?
Thanks to anybody who can shed some light…

Hi,

14.9.5 definitely exists for Ubuntu 18.04 as it’s found here:

sounds to me though, that most likely you are using the gitlab-ee repository and not gitlab-ce. Check what you have under /etc/apt/sources.list.d/ as there should either be gitlab_gitlab-ce.list or gitlab_gitlab-ee.list

If you are using the EE one, then gitlab-ce won’t be available. The same if you have gitlab-ce repository, then it won’t show gitlab-ee in the repository search.

You can also do:

dpkg -l | grep -i gitlab

to see whether you have gitlab-ce installed or gitlab-ee installed.

Whilst it’s possible to downgrade gitlab-ee to gitlab-ce, it’s not so straightforward so be careful depending on which package you currently have installed on your system. It’s much easier to upgrade from gitlab-ce to gitlab-ee however in comparison.

Once you have verified what package you currently have installed, as well as what repository you have installed, then we can help further with the upgrade process be it upgrading gitlab-ce version, or upgrading gitlab-ee version.

Thanks for the reply, I got

root@ip-xxx:/etc/apt/sources.list.d# ls -la
-rw-r--r-- 1 root root  399 Jun 21 12:28 gitlab_gitlab-ce.list
-rw-r--r-- 1 root root  261 Feb 13  2020 gitlab_gitlab-ce.list.distUpgrade
-rw-r--r-- 1 root root  261 Jun  8  2020 gitlab_gitlab-ee.list

and

root@ip-xxx:/var/opt/gitlab/backups# dpkg -l | grep -i gitlab
ii  gitlab-ce  14.8.2-ce.0 amd64 GitLab Community Edition (including NGINX, Postgres, Redis)

Does that confirm it is CE ?

Well for some reason you have both ce and ee in your /etc/apt/sources.list.d directory. I suggest you delete the gitlab_gitlab-ee.list file (because from the dpkg command you have gitlab-ce installed) and then do:

apt-get clean all
apt-get update

once done, then check what versions of gitlab can be found. Also take a look inside the gitlab_gitlab-ce.list file to make sure it’s not commented out (with a hash at the beginning of the lines). If it is commented out, then uncomment and save that file, and then see if you can use the apt commands to find the 14.9.5 version.

Thanks for the update. I think I followed the requirements but could not solve yet :

  • The EE reference has been deleted
 dpkg -l | grep -i gitlab
ii  gitlab-ce 14.8.2-ce.0 amd64 GitLab Community Edition (including NGINX, Postgres, Redis)

Then I ran apt-get clean all && apt-get update

Install still fails though, and there are no commented lines in the repos reference :
That file contains

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

deb [signed-by=/usr/share/keyrings/gitlab_gitlab-ce-archive-keyring.gpg] https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ bionic main
deb-src [signed-by=/usr/share/keyrings/gitlab_gitlab-ce-archive-keyring.gpg] https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ bionic main

Error is still

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

I’ll keep searching, grateful if you can help !
Have a nice day.

You might hit an issue I came across, and need to refresh the repository. I had this around version 12.9.3 but it has helped others in the past. As per the install docs here: Download and install GitLab

do:

 curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash

this will download the script from Gitlab, and run the necessary steps to refresh your repository. Then try again to see if the package can be found.

This step helped me, when I couldn’t see versions higher than 12.9.3.

1 Like

Useful but unfortunately not solved it seems.

The repository is setup! You can now install packages.

root@ip-172-26-1-208:/etc/apt/sources.list.d# sudo apt install gitlab-ce=14.9.5
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '14.9.5' for 'gitlab-ce' was not found

Really strange.

Thank you! I was stuck at 14.4.2 and your suggestion helped me!