无法安装 php5-mysql

无法安装 php5-mysql

我有 ubuntu 32 位服务器(14.04),运行 php5,我正在尝试安装 php5-mysql

但我收到依赖项错误。我该如何修复此问题?

~$ sudo apt-get install php5-mysql
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:
 php5-mysql : Depends: phpapi-20121212+lfs
              Depends: php5-common (= 5.5.9+dfsg-1ubuntu4.5) but 5.5.19+dfsg-1+deb.sury.org~precise+1 is to be installed
E: Unable to correct problems, you have held broken packages.

答案1

好的,我一直在使用 php 5.5.19+dfsg-1+deb.sury.org~precise+1,但是,当我尝试安装 php5-mysql 时出现了依赖性问题。

于是我删除了 php、php-common,认为它只会删除程序文件,而不会删除配置页面。(我真的很喜欢我所拥有的配置)

我重启了网络服务器。然后,我使用标准存储库重新安装了 php5 和 php5-mysql。安装过程中系统提示我使用现有配置文件,我照做了。然后安装成功完成。

也许这可以帮助处于类似情况的其他人。

答案2

尝试运行sudo apt-get -f install它将纠正依赖性问题

相关内容