无法启动 phpmyadmin

无法启动 phpmyadmin

我无法在我的 VPS 中启动 apcahe2 和 phpmyadmin。

$ sudo apt-get install phpmyadmin    
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:   
 phpmyadmin : Depends: php5-mysql but it is not going to be installed or   
                       php5-mysqli but it is not installable or   
                       php5-mysqlnd but it is not going to be installed   
              Recommends: php5-gd but it is not going to be installed   
E: Unable to correct problems, you have held broken packages.   

答案1

当 ubuntu 存储库中有可用的软件包时,从外部源(即从 *deb 文件)安装软件包时,通常会出现此问题。您可以通过运行 aptitude 获取更多信息(但您可能需要先安装它,它不是默认 ubuntu 附带的)

通常,删除非官方软件包(使用apt-get remove phpmyadmin然后安装官方软件包(使用apt-get install phpmyadmin)是取消保留软件包的方法。

此外,apt-get install --fix-missing还会尝试修复所有缺失的软件包,这也应该可以解决您“不会安装”的缺失软件包

我认为如果只有一个级别的软件包包含您要安装的软件包,则会自动修复此问题。如果有更多级别(即 php5-mysql 需要其他东西)我真的认为您应该使用 aptitude 来帮助您解决丢失的软件包(因为只要您阅读它提供的内容,您就应该能够选择正确的解决方案)

相关内容