我无法安装 LAMP,也无法运行 TASKSEL。这现在真的成了一件麻烦事。
我安装 LAMP 的输入:sudo apt-get install lamp-server
输出:
The following packages have unmet dependencies:
apache2 : Conflicts: apache2.2-common but 2.2.22-6ubuntu5 is to be installed
apache2-bin : Conflicts: apache2.2-common but 2.2.22-6ubuntu5 is to be installed
apache2-data : Conflicts: apache2.2-common but 2.2.22-6ubuntu5 is to be installed
apache2.2-common : Depends: apache2.2-bin (= 2.2.22-6ubuntu5) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
my input for running tasksel: sudo tasksel
next the interface (the familiar text based ui) starts and after selecting the progress bar starts. But then unexpected it breaks of (drops out of the ui)
with this message:
tasksel: aptitude failed (100)
现在我进行了很多搜索并尝试了所有方法:“卸载 apache”(未安装)、“尝试查找损坏的软件包”(无)、“清除”、“删除”等。
有人知道吗?还是说这么多年过去了,我还是新手,还是用 Windows 更好?(但愿不是。)我正在考虑重新安装一个全新的 Ubuntu,但这也太麻烦了。此外,这会让我比现在更觉得自己是个白痴。(好吧,;))
$ apt-cache policy apache2
apache2:
Installed: (none)
Candidate: 2.4.7-1ubuntu4.1
Version table:
2.4.7-1ubuntu4.1 0
500 archive.ubuntu.com/ubuntu trusty-updates/main amd64 Packages
500 archive.ubuntu.com/ubuntu trusty-security/main amd64 Packages
2.4.7-1ubuntu4 0
500 archive.ubuntu.com/ubuntu trusty/main amd64 Packages
2.2.22-6ubuntu5 0
500 old-releases.ubuntu.com/ubuntu raring/main amd64 Packages
$ lsb_release -a LSB Version: core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch:core-4.1-amd64:core-4.1-noarch:security-4.0-amd64:security-4.0-noarch:security-4.1-amd64:security-4.1-noarch Distributor ID: Ubuntu Description: Ubuntu 14.04.1 LTS Release: 14.04 Codename: trusty –
答案1
我不知道这是否能解决这个问题,但https://help.ubuntu.com/community/ApacheMySQLPHP他们说你应该将它与插入符号(^)一起使用,这对我有用:
sudo apt-get install lamp-server^
答案2
赶紧跑
apt-get update
然后重试。对我有用。