安装 git 时出错

安装 git 时出错

我正在尝试在 Ubuntu 16.04 LTS 上安装 git,但每次都会收到此消息。我已经卸载了 libpcre2-8-0,而 synaptic 在损坏的软件包中没有显示任何内容。只有当我标记要安装的 git-core 软件包时才会显示,我不知道之后该怎么做。

$ sudo apt 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: libpcre2-8-0 (>= 10.22) but 10.21-1 is to be installed
E: Unable to correct problems, you have held broken packages.

答案1

简单的解决方案是使用突触。

您可以尝试

sudo apt install libpcre2-8-0 

否则,如果可能的话,获取 synaptic 并尝试通过它安装 git。它是 apt 的前端应用程序。尝试使用 apt 安装它。如果出现问题,请从此处获取软件包https://packages.ubuntu.com/xenial/

dpkg -i ~/Downloads/'package name'

如果您需要其他任何东西,这也会为您提供输出。

相关内容