我如何在ubuntu 14.04桌面上摆脱“apache2:取决于:perl但它不会被安装”?

时间:2016-09-21 04:36:21

标签: apache perl ubuntu-14.04 apt aptitude

这是我在运行时在控制台上出现的错误消息

$sudo apt-get install apache2

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:
    apache2 : Depends: perl but it is not going to be installed
    Depends: apache2-bin (= 2.4.7-1ubuntu4) but it is not going to be installed
    Depends: apache2-data (= 2.4.7-1ubuntu4) but 2.4.7-1ubuntu4.13 is to be installed
    E: Unable to correct problems, you have held broken packages.

更新输出

$sudo apt-get update
Hit http://ppa.launchpad.net trusty InRelease
Ign http://in.archive.ubuntu.com trusty InRelease
Hit http://in.archive.ubuntu.com trusty Release.gpg
Hit http://ppa.launchpad.net trusty/main amd64 Packages
Hit http://in.archive.ubuntu.com trusty Release
Hit http://ppa.launchpad.net trusty/main i386 Packages
Hit http://ppa.launchpad.net trusty/main Translation-en
Hit http://in.archive.ubuntu.com trusty/main amd64 Packages
Hit http://in.archive.ubuntu.com trusty/main i386 Packages
Hit http://in.archive.ubuntu.com trusty/main Translation-en
Ign http://in.archive.ubuntu.com trusty/main Translation-en_IN
Reading package lists... Done

我最近做过

sudo rm -rf /var/lib/apt/lists/*
sudo rm /etc/apt/sources.list

后来我去了

sudo -i software-properties-gtk

然后检查规范复选框,

sudo apt-get update我执行了这个命令。

任何人都可以帮我在我的ubuntu中安装apache!

1 个答案:

答案 0 :(得分:1)

尝试使用sudo apt-get -f install强制安装。

您可能需要在sudo apt-get updatesudo apt-get -f install之间来回切换,以便慢慢安装所有软件包。

还尝试清理缓存并配置尚未配置的任何软件包。 sudo apt-get clean sudo dpkg --configure -a

希望这能让你到达目的地。