我使用sudo apt upgrade git
安装了git,但它只安装了1.9.1版本,即使最新的git是2.11.0。
当我尝试运行apt-cache policy git时,我得到了以下内容
$apt-cache policy git
git:
Installed: 1:1.9.1-1ubuntu0.3
Candidate: 1:1.9.1-1ubuntu0.3
Version table:
*** 1:1.9.1-1ubuntu0.3 0
500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
100 /var/lib/dpkg/status
1:1.9.1-1 0
500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
答案 0 :(得分:6)
试一试:
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git