I've installed a PPA, ondrej/php5, so I can install PHP 5.5 on a Ubuntu 12.04 server. However, I want to install Apache 2.2, and the above PPA provides Apache 2.4.
I created the file /etc/apt/preferences.d/apache2:
Package: *apache*
Pin: release o=LP-PPA-ondrej-php5
Pin-Priority: -100
Relevant lines from apt-cache policy:
500 http://ppa.launchpad.net/ondrej/php5/ubuntu/ precise/main i386 Packages
release v=12.04,o=LP-PPA-ondrej-php5,a=precise,n=precise,l=PPA for PHP5,c=main
origin ppa.launchpad.net
500 http://ppa.launchpad.net/ondrej/php5/ubuntu/ precise/main amd64 Packages
release v=12.04,o=LP-PPA-ondrej-php5,a=precise,n=precise,l=PPA for PHP5,c=main
origin ppa.launchpad.net
After creating the file, here is the result of apt-cache policy apache2:
apache2:
Installed: (none)
Candidate: (none)
Package pin: 2.4.6-3+debphp.org~precise+1
Version table:
2.4.6-3+debphp.org~precise+1 -100
500 http://ppa.launchpad.net/ondrej/php5/ubuntu/ precise/main amd64 Packages
100 /var/lib/dpkg/status
2.2.22-1ubuntu1.4 -100
500 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages
2.2.22-1ubuntu1 -100
500 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
Why are official Ubuntu repos being given a priority of -100?