美文网首页
ubuntu安装apache2遇到的失败问题解决办法

ubuntu安装apache2遇到的失败问题解决办法

作者: 时彬斌 | 来源:发表于2018-12-03 17:12 被阅读0次

在ubuntu16.04上安装apache2相关的工具时无法正常安装报如下错误:

bin # sudo apt-get install apache2-utils
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-utils : Depends: libapr1 (>= 1.4.8-2~) but it is not installable
                 Depends: libaprutil1 (>= 1.5.0) but it is not installable
E: Unable to correct problems, you have held broken packages.

和如下错误:

# 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: apache2-bin (= 2.4.18-2ubuntu3.9) but it is not going to be installed
           Depends: apache2-utils (>= 2.4)
           Recommends: ssl-cert but it is not installable
E: Unable to correct problems, you have held broken packages.

解决办法:

 sudo echo "deb http://archive.ubuntu.com/ubuntu trusty main universe restricted multiverse" > /etc/apt/sources.list

sudo apt-get update

安装时一路Y即可;
再次执行安装命令:

sudo apt-get install apache2-utils

就成功的安装了新的ab命令。

相关文章

网友评论

      本文标题:ubuntu安装apache2遇到的失败问题解决办法

      本文链接:https://www.haomeiwen.com/subject/shxucqtx.html