update gitlab-jh from old version to latest

169 阅读1分钟

240301-updateGitlabSrv

eton@240301-updateGitlabSrv 升级服务器的软件;

  • eton@240702 upgrade gitlab;

Preparing to unpack .../22-gitlab-jh_17.1.1-jh.0_amd64.deb ... gitlab preinstall: It seems you are upgrading from 16.9 to 17.1. gitlab preinstall: It is required to upgrade to the latest 16.11.x version first before proceeding. gitlab preinstall: Please follow the upgrade documentation at docs.gitlab.com/ee/update/#… dpkg: error processing archive /tmp/apt-dpkg-install-G5TkiT/22-gitlab-jh_17.1.1-jh.0_amd64.deb (--unpack): new gitlab-jh package pre-installation script subprocess returned error exit status 1 Errors were encountered while processing: /tmp/apt-dpkg-install-G5TkiT/22-gitlab-jh_17.1.1-jh.0_amd64.deb needrestart is being skipped since dpkg has failed E: Sub-process /usr/bin/dpkg returned an error code (1)

apt install gitlab-jh=16.11.5-jh.0 gitlab-jh

因为存在数据库滚动升级的要求,所以需要递进升级;

  • Error-1:

W: packages.gitlab.cn/repository/…: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.

  • Answer:
  1. $ sudo apt-key list Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)). /etc/apt/trusted.gpg

是因为上面的文件存放属于过期配置,需要放到新的规范中的位置,操作如下,问题解决. sudo cp /etc/apt/trusted.gpg /etc/apt/trusted.gpg.d


  • Error-2:

gitlab preinstall: It seems you are upgrading from 15.11 to 16.9. gitlab preinstall: It is required to upgrade to the latest 16.7.x version first before proceeding. gitlab preinstall: Please follow the upgrade documentation at docs.gitlab.com/ee/update/#…

如何安装16.7版本作为过度呢?

#1. 找到有哪些版本,必须是精确的版本号;
apt-cache show gitlab-jh|grep "Version: "
#2. 根据提示进行滚动升级,之所以两个是因为当前这个需要跳过多个关键版本,否则无法升级;
apt install gitlab-jh=16.3.0-jh.0 gitlab-jh=16.7.0-jh.0 gitlab-jh

在完成三次完整的数据库等备份/安装/重启后,才将jitlab-jh完成最新的升级;

240301-updateGitlabSrv.end