首页 > 解决方案 > 无法将 GitLab CE 从 13.4.3 更新到 13.5.4

问题描述

我有一台不到一年前安装的 Ubuntu 服务器20.04.01 LTS机器。GitLab CE (v13.4.3)我无法更新到新13.5.4版本,因为 apt 告诉我所有软件包都是最新的。

ebenedos@fcssrv-git:~$ sudo apt-get update && sudo apt-get install gitlab-ce
Hit:1 http://it.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://it.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:3 http://it.archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:4 http://it.archive.ubuntu.com/ubuntu focal-security InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
gitlab-ce is already the newest version (13.4.3-ce.0).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

我也尝试检查丢失的迁移,但似乎一切正常

ebenedos@fcssrv-git:~$ sudo gitlab-rails runner -e production 'puts Gitlab::BackgroundMigration.remaining'
0

还尝试在更新到之前强制更新到更新的错误修复版本13.5.4

ebenedos@fcssrv-git:~$ sudo apt-get update && sudo apt-get install gitlab-ce=gitlab-ce_13.4.6-ce.0
Hit:1 http://it.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://it.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:3 http://it.archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:4 http://it.archive.ubuntu.com/ubuntu focal-security InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version 'gitlab-ce_13.4.6-ce.0' for 'gitlab-ce' was not found

标签: gitlab-ce

解决方案


最后我明白这个问题与旧的 PPA 有关。可能 Gitlab 团队已经更新了它们,解决方案是手动更新 PPA:

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

现在更新系统重新启动工作

ebenedos@fcssrv-git:~$ curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
Detected operating system as Ubuntu/focal.
Checking for curl...
Detected curl...
Checking for gpg...
Detected gpg...
Running apt-get update... done.
Installing apt-transport-https... done.
Installing /etc/apt/sources.list.d/gitlab_gitlab-ce.list...done.
Importing packagecloud gpg key... done.
Running apt-get update... done.

The repository is setup! You can now install packages.
ebenedos@fcssrv-git:~$ sudo apt update
Hit:1 http://it.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://it.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:3 http://it.archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:4 http://it.archive.ubuntu.com/ubuntu focal-security InRelease
Hit:5 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu focal InRelease
Hit:6 https://packages.gitlab.com/gitlab/gitlab-ee/ubuntu focal InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
ebenedos@fcssrv-git:~$ sudo apt list --upgradable
Listing... Done
gitlab-ce/focal 13.5.4-ce.0 amd64 [upgradable from: 13.4.3-ce.0]
N: There are 33 additional versions. Please use the '-a' switch to see them.

推荐阅读