使用 apt 安装 php 5.4.9 时出现的问题

使用 apt 安装 php 5.4.9 时出现的问题

我使用了一个脚本将 php 从 php 5.4 降级到 php 5.3,它起作用了。现在我想用 synaptic form 将我的 php 升级到 php 5.4.9 Package->Force Version当我想应用这些改变时,它给了我这个错误:

Could not apply changes!
Fix broken packages first.

我尝试了所有方法,从删除包列表到使用、、、等sudo apt-get -f install。 最后,当我使用它时产生了这个错误:sudo dpkg --configure -asudo apt-get cleansudo apt-get auto-removesudo apt-get updatesudo apt-get install php5=5.4.9-4ubuntu2

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 : Depends: libapache2-mod-php5 (>= 5.4.9-4ubuntu2) but it is not going to be        installed or
libapache2-mod-php5filter (>= 5.4.9-4ubuntu2) but it is not going to be installed or
php5-cgi (>= 5.4.9-4ubuntu2) but it is not going to be installed or
php5-fpm (>= 5.4.9-4ubuntu2) but it is not going to be installed
Depends: php5-common (>= 5.4.9-4ubuntu2) but 5.3.10-1ubuntu3 is to be installed
W: Duplicate sources.list entry http://bg.archive.ubuntu.com/ubuntu/ precise/main   amd64 Packages      (/var/lib/apt/lists/bg.archive.ubuntu.com_ubuntu_dists_precise_main_binary-amd64_Packages)
W: Duplicate sources.list entry http://bg.archive.ubuntu.com/ubuntu/   precise/restricted amd64 Packages (/var/lib/apt/lists/bg.archive.ubuntu.com_ubuntu_dists_precise_restricted_binary- amd64_Packages)

我正在使用 Ubuntu 13.04,但我无法重新安装 ubuntu,因为在我的国家互联网带宽非常昂贵,所以任何帮助都将非常感谢。

答案1

试试这个答案

sudo aptitude install php5

它将安装 php5 及其依赖项。

从这里https://askubuntu.com/a/403353/246710。 帮助过我。

相关内容