Error upgrading from Ubuntu 16.04 to Ubuntu 18.04

Hello community,

Thanks in advance for the help and guidance, I’m a bit panicked right now and I’d like to restore our Gitlab instance as soon as possible.

I tried to upgrade our Ubuntu instance from 16.04 to 18.04, we were using GitLab 12.2.5. For some reason, Ubuntu tried to upgrade Gitlab from 12.2.5 Xenial (16.04) to 12.2.5 Bionic (18.04), basically same GitLab version but a different package I guess.

The upgrade failed displaying this error:
version `GLIBC_2.25’ not found (required by /opt/gitlab/embedded/lib/libruby.so.2.6)

I tried to fix the installation using “apt install -f” but does nothing, and our GitLab instance doesn’t work and can’t be restarted.

To be honest, I don’t have any clue about how to repair the problem, looks like our GitLab installation is in the middle of 16.04 and 18.04. If I uninstall GitLab using “apt” and install it again, do I need to restore a backup or only deletes the application files and not the data?

Thanks again for the help and guidance.

Hi @mpellicer. Sorry you’re having problems following the OS upgrade.

In upgrading to 18.04 (bionic), I believe the GitLab repository source in /etc/apt/sources.list.d/gitlab_gitlab-**. list gets commented out (effectively disabling it).
I’m somewhat surprised to hear that the system would try upgrading to the 18.04 bionic package without re-adding or un-commenting the GitLab source repository from your apt sources.

Uninstalling using apt should keep the config and database intact, but I’m not sure that its necessary here.

I feel good steps forward are to make sure the GitLab source repository is available and reinstall gitlab instead of uninstalling & installing.

To make sure the repo is added, can you verify that the gitlab-source for bionic is un-commented (no # in front) in /etc/apt/sources.list.d/gitlab*?

An easy way to check would be:

grep -v "^#" /etc/apt/sources.list.d/gitlab*.list

This should return

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

If not, I suggest running:
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-e/script.deb.sh | sudo bash
to re-add the GitLab repository source.

Then, I suggest re-installing with:
sudo apt install gitlab-ee --reinstall.
After that, run:
sudo gitlab-ctl reconfigure
to make sure everything is as expected.

I expect that this should get around any errors and GitLab will then “just work”. You can check the status of GitLab components with gitlab-ctl status. If this does not work, it might be helpful to run gitlab-rake gitlab:check to check for configuration issues or gitlab-ctl tail to check for errors int he GitLab logs.

Note that if you’re using gitlab-ce, you’ll need to change the ee to ce in the examples above.

I hope you find this helpful. Let us know how it goes!

1 Like