I've installed ppa:ondrej/php5
(in order to use latest PHP 5.5) in Ubuntu 14.04 LTS, but it also includes apache2
package, which causes me unable to install apache2-mpm-worker
:
$ sudo apt-get install apache2-mpm-worker
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:
apache2-mpm-worker : Depends: apache2 (= 2.4.12-1+deb.sury.org~trusty+5) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
And when you use apt-cache policy
to check, you will find out apache2 has been replaced by PPA:
$ apt-cache policy apache2
apache2:
Installed: (none)
Candidate: 2.4.16-3+deb.sury.org~trusty+1
Version table:
2.4.16-3+deb.sury.org~trusty+1 0
500 http://ppa.launchpad.net/ondrej/php5/ubuntu/ trusty/main amd64 Packages
2.4.7-1ubuntu4.5 0
500 http://tw.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
2.4.7-1ubuntu4 0
500 http://tw.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
So I setup apt pin in /etc/apt/preferences
to its lower priority:
#
Package: apache2
Pin: origin "ppa.launchpad.net"
Pin-Priority: 1
But not working:
$ apt-cache policy apache2
apache2:
Installed: (none)
Candidate: 2.4.16-3+deb.sury.org~trusty+1
Package pin: 2.4.16-3+deb.sury.org~trusty+1
Version table:
2.4.16-3+deb.sury.org~trusty+1 1
500 http://ppa.launchpad.net/ondrej/php5/ubuntu/ trusty/main amd64 Packages
2.4.7-1ubuntu4.5 1
500 http://tw.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
2.4.7-1ubuntu4 1
500 http://tw.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
Same results with release o=LP-PPA-ondrej-php5
and version 2.4.16-*
. I would like to know how to do apt pin correctly ?