【问题标题】:Cannot install git on Linux Mint 17.3无法在 Linux Mint 17.3 上安装 git
【发布时间】:2017-10-03 01:34:34
【问题描述】:

我尝试安装 git 几个小时,但无论我做什么都会收到此错误:

 sudo apt-get install git
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 git : Depends: liberror-perl but it is not installable
E: Unable to correct problems, you have held broken packages.

我在这里阅读了答案,但我尝试了以下方法但没有成功: sudo apt-get update
sudo apt-get upgrade sudo apt-get install -f

我已经尝试过这里的解决方案:

https://superuser.com/questions/899311/apt-get-error-when-installing-git

我删除了/var/lib/apt/lists/* 中的所有内容并运行sudo apt-get update 我也尝试安装liberror-perl,然后出现以下错误:

Reading package lists... Done Building dependency tree
Reading state information... Done Package liberror-perl 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 'liberror-perl' has no installation candidate

如何解决这个问题的包?谢谢。

更新:现在我尝试安装另一个包,但我得到了同样的错误:

Package 'devscripts' has no installation candidate

【问题讨论】:

  • 这个link可以解决这个问题

标签: linux git installation packages


【解决方案1】:

您是否尝试按照此链接中的说明进行操作? https://tecadmin.net/install-git-on-ubuntu/

$ sudo add-apt-repository ppa:git-core/ppa
$ sudo apt-get update
$ sudo apt-get install git

【讨论】:

  • 是的,我刚刚发现并尝试了这个,现在我有重复的 git 包。我不明白包裹有什么问题。我得到了以下重复的包:W: Duplicate sources.list entry http://ppa.launchpad.net/git-core/ppa/ubuntu/ trusty/main amd64 Packages (/var/lib/apt/lists/ppa.launchpad.net_git-core_ppa_ubuntu_dists_trusty_main_binary-amd64_Packages) W: Duplicate sources.list entry http://ppa.launchpad.net/git-core/ppa/ubuntu/ trusty/main i386 Packages (/var/lib/apt/lists/ppa.launchpad.net_git-core_ppa_ubuntu_dists_trusty_main_binary-i386_Packages)
猜你喜欢
  • 2023-03-04
  • 2014-01-01
  • 2019-11-10
  • 1970-01-01
  • 1970-01-01
  • 2020-08-24
  • 2017-08-02
  • 2015-01-03
  • 1970-01-01
相关资源
最近更新 更多