0

I used a script for downgrade php from php 5.4 to php 5.3 it workded.Now i want to upgrade my php to php 5.4.9 with synaptic form Package->Force Version when i want to apply the chanes it gives me this error:

Could not apply changes!
Fix broken packages first.

I tried every thing form removing package lists to using sudo apt-get -f install, sudo dpkg --configure -a, sudo apt-get clean, sudo apt-get auto-remove, sudo apt-get update etc.. Finally when i used sudo apt-get install php5=5.4.9-4ubuntu2 it generated this error:

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)

I'm using Ubuntu 13.04 and i can't reinstall ubuntu again because internet band-width is very expensive in my country so any help would be really appreciated.

1 Answers1

1

Try this answer

sudo aptitude install php5

It will install php5 along with it's dependencies.

from here https://askubuntu.com/a/403353/246710. Helped me.

gorodezkiy
  • 171
  • 3
  • 5