我正在尝试使用以下代码在 Ubuntu 14 上安装 git
sudo apt-get install git
我得到这个输出:
The following packages have unmet dependencies:
git : Depends: liberror-perl but it is not installable
Recommends: ssh-client
E: Unable to correct problems, you have held broken packages
我正在尝试通过以下代码安装 ssh-client:
sudo apt-get install openssh-client
然后出现此错误:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package openssh-client 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 'openssh-client' has no installation candidate
答案1
尝试这个,
前往 Ubuntu 软件中心。
输入“Muon Package Manager”并安装它。
打开 Muon 包管理器并输入“openssh-client”。
单击窗口中的“openssh-client”并将其标记为安装。
现在单击“应用更改”。
它应该会显示您需要的所有依赖项。只需单击“确定”即可安装这些依赖项。
或者更好的是...
在 Muon 包管理器中输入“git”,让它为您完成工作。只需单击“确定”即可安装它附带的依赖项。
希望这可以帮助,