![以下软件包具有未满足的依赖关系(apache)](https://linux22.com/image/1040899/%E4%BB%A5%E4%B8%8B%E8%BD%AF%E4%BB%B6%E5%8C%85%E5%85%B7%E6%9C%89%E6%9C%AA%E6%BB%A1%E8%B6%B3%E7%9A%84%E4%BE%9D%E8%B5%96%E5%85%B3%E7%B3%BB%EF%BC%88apache%EF%BC%89.png)
The following packages have unmet dependencies:
apache2:
Depends: apache2-mpm-worker (= 2.2.22-1ubuntu1) but 2.2.22-1ubuntu1.2 is to be installed or
apache2-mpm-prefork (= 2.2.22-1ubuntu1) but it is not going to be installed or
apache2-mpm-event (= 2.2.22-1ubuntu1) but it is not going to be installed or
apache2-mpm-itk (= 2.2.22-1ubuntu1) but it is not going to be installed
Depends: apache2.2-common (= 2.2.22-1ubuntu1) but 2.2.22-1ubuntu1.2 is to be installed
E: Unable to correct problems, you have held broken packages.
重新安装 Apache 时遇到问题。
答案1
首先回到所有依赖关系都已满足的状态:
sudo apt-get install -f
尝试删除所有 Apache 内容:
sudo dpkg --purge --force-depends "apache*"
立即重新安装所有必要的依赖项:
sudo apt-get install -f
现在您可以重新尝试安装 apache。如果问题仍然存在,请提供更多信息。