Git 安装错误“E: 软件包‘git’没有安装候选项”Ubuntu 16.04.6

Git 安装错误“E: 软件包‘git’没有安装候选项”Ubuntu 16.04.6

我查看了其他帖子以寻找解决方案,但仍然面临此问题。我已经使用sudo apt-get update和更新了 Ubuntu sudo apt update。但我仍然面临此问题,如下所示:

~$ sudo apt-get install git
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Package git is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'git' has no installation candidate

有人能告诉我如何解决这个问题吗?
我是 Ubuntu 新手。

更新 我重新安装了 ubuntu,并且 git 也安装了,但是现在 ubuntu 没有更新,并且在运行命令时出现以下错误sudo apt update

E: Failed to fetch http://ca.archive.ubuntu.com/ubuntu/dists/xenial-backports/main/dep11/icons-64x64.tar Could not open file /var/lib/apt/lists/partial/ca.archive.ubuntu.com_ubuntu_dists_xenial-backports_main_dep11_icons-64x64.tar.gz - open (13: Permission denied) [IP: 91.189.91.24 80] E: Some index files failed to download. They have been ignored, or old ones used instead.

相关内容