尝试安装 apache2 时出错 - E: 未满足的依赖项。尝试 'apt-get -f install' 没有包(或指定解决方案)
Error while attempting to install apache2 - E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution)
当我尝试安装 apache 时,出现以下错误。
sudo apt-get install apache2
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
apache2 : Depends: apache2-bin (= 2.4.18-2ubuntu3.13) but it is not going to be installed
Depends: apache2-utils (>= 2.4) but it is not going to be installed
Depends: apache2-data (= 2.4.18-2ubuntu3.13) but it is not going to be installed
Recommends: ssl-cert but it is not going to be installed
golang-1.6 : Depends: golang-1.6-go (>= 1.6.2-0ubuntu5~16.04.4) but it is not going to be installed
golang-1.6-doc : Depends: golang-1.6-go but it is not going to be installed
golang-go : Depends: golang-1.6-go but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
我试过了运行
sudo apt-get update
这也没有解决问题。
任何人都可以帮助我理解这个问题吗?
尝试:
sudo apt-get -f install apache2
我刚刚完全删除了 golang。
sudo find /var/lib/apt/lists -type f |xargs rm -f >/dev/null
sudo dpkg --remove golang-go
这个 link 很有用:https://askubuntu.com/questions/252777/how-can-i-resolve-dpkg-dependency
之后,我更新了。然后apache2就安装成功了。
Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: active (running) since Fri 2019-10-18 11:50:14 UTC; 2min 3s ago
Docs: man:systemd-sysv-generator(8)
CGroup: /system.slice/apache2.service
├─5661 /usr/sbin/apache2 -k start
├─5664 /usr/sbin/apache2 -k start
└─5665 /usr/sbin/apache2 -k start
感谢大家的回复!!
当我尝试安装 apache 时,出现以下错误。
sudo apt-get install apache2
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
apache2 : Depends: apache2-bin (= 2.4.18-2ubuntu3.13) but it is not going to be installed
Depends: apache2-utils (>= 2.4) but it is not going to be installed
Depends: apache2-data (= 2.4.18-2ubuntu3.13) but it is not going to be installed
Recommends: ssl-cert but it is not going to be installed
golang-1.6 : Depends: golang-1.6-go (>= 1.6.2-0ubuntu5~16.04.4) but it is not going to be installed
golang-1.6-doc : Depends: golang-1.6-go but it is not going to be installed
golang-go : Depends: golang-1.6-go but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
我试过了运行
sudo apt-get update
这也没有解决问题。
任何人都可以帮助我理解这个问题吗?
尝试:
sudo apt-get -f install apache2
我刚刚完全删除了 golang。
sudo find /var/lib/apt/lists -type f |xargs rm -f >/dev/null
sudo dpkg --remove golang-go
这个 link 很有用:https://askubuntu.com/questions/252777/how-can-i-resolve-dpkg-dependency
之后,我更新了。然后apache2就安装成功了。
Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: active (running) since Fri 2019-10-18 11:50:14 UTC; 2min 3s ago
Docs: man:systemd-sysv-generator(8)
CGroup: /system.slice/apache2.service
├─5661 /usr/sbin/apache2 -k start
├─5664 /usr/sbin/apache2 -k start
└─5665 /usr/sbin/apache2 -k start
感谢大家的回复!!