【发布时间】:2016-09-21 04:36:21
【问题描述】:
这是我在运行时控制台出现的错误消息
$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!
【问题讨论】:
-
我不认为你的问题是在正确的地方。 Ubuntu 论坛可能有用,或者 serverfault.com 或 superuser.com?另外为什么不只是 sudo apt-get install perl ?
-
谢谢。当我运行 sudo apt-get install perl perl 时仍然出现错误:取决于:perl-base (= 5.18.2-2ubuntu1) 但要安装 5.18.2-2ubuntu1.1 无论如何我把这个问题移到了 serverfault.com 那里的人可能知道。
-
你可以从这里获取包并手动安装:packages.ubuntu.com/precise/apache2
-
你想做什么?你为什么删除sources.list?这可能是您的问题的根源
-
没有什么能帮助我......外部来源提供的解决方案之一让我做到了。
标签: apache perl ubuntu-14.04 apt aptitude