如何在 Ubuntu 20.04 上将 Git 从版本 2.38.1 降级到 2.37.3?
这是必需的,因为 Atlassian Bitbucket Server 8.+ 不支持最新版本的 Git。请参阅:https://confluence.atlassian.com/bitbucketserver/supported-platforms-776640981.html
我安装了最新的 git,并将此 repo 添加到 source.list: ppa:git-core/ppa
命令 apt policy git 使得:
git:
Installed: 1:2.38.1-0ppa1~ubuntu20.04.1
Candidate: 1:2.38.1-0ppa1~ubuntu20.04.1
Version table:
*** 1:2.38.1-0ppa1~ubuntu20.04.1 500
500 http://ppa.launchpad.net/git-core/ppa/ubuntu focal/main amd64 Packages
100 /var/lib/dpkg/status
1:2.25.1-1ubuntu3.6 500
500 http://mirror.leaseweb.com/ubuntu focal-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
1:2.25.1-1ubuntu3 500
500 http://mirror.leaseweb.com/ubuntu focal/main amd64 Packages
运行 sudo apt install -f ./git-all_2.37.3-0ppa1~ubuntu20.04.1_all.deb 后出现以下错误:
The following packages have unmet dependencies:
git-all : Depends: git (< 1:2.37.3-.)
E: Unable to correct problems, you have held broken packages.
谢谢,马蒂