由于软件包损坏,无法在 ubuntu 16.04 上安装 git/perl

由于软件包损坏,无法在 ubuntu 16.04 上安装 git/perl

这是我尝试在 Lubuntu 16.04 上安装 git 时遇到的错误。

这是我尝试时得到的结果sudo apt install git

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

然后我尝试使用以下命令重新安装 perl sudo apt install --reinstall perl liberror-perl

The following packages have unmet dependencies:
    perl : Depends: perl-base (= 5.22.1-9) but 5.22.1-9ubuntu0.2 is to be installed 
           Depends: libperl5.22 (= 5.22.1-9) but 5.22.1-9ubuntu0.2 is to be installed 
           Recommends: rename but it is not going to be installed
E: Unable to correct problems, you have held broken packages

以下也没有产生任何结果:

sudo apt update
sudo apt dist-upgrade
sudo apt install -f
sudo apt install git

希望有人能帮我解决这个问题。谢谢。

答案1

我选择:

apt-get install -y --allow-downgrades perl-base=5.22.1-9

似乎有效。

相关内容