Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to install PHP 5.4 with FPM on a 12.04 virtual machine. The popular PPA solution for installing PHP 5.4 doesn't seem to include the php5-fpm package.

What's the best way to install this version?

share|improve this question
up vote 5 down vote accepted

If your system is 32 bit (old computers):

Go to this thread and select the latest version. Then download the file there is on the Downloadable files section

If your system is 64 bit (the most common by now):

Go to this thread and select the latest version. Then download the file there is on the Downloadable files section

Installing PHP from terminal:

Enter the following command:

sudo apt-get install php5-fpm

Compile your self:

In this web page you will found the download link with the packages.

Then you have to compile and install.

More information about the LAMP installation on Ubuntu 12.04

share|improve this answer
Thank you, but it seems there only are PHP 5.3 packages listed there. – Gerry Jun 22 '12 at 10:37
Have you tried with "sudo apt-get php4-fpm"? – Lucio Jun 22 '12 at 17:11
I think you are overlooking that I want to install the 5.4 version, which has not trickled down yet in the official repositories. – Gerry Jun 23 '12 at 22:12
@Gerry For the 5.4v you have to compile the source. – Lucio Jun 24 '12 at 17:49
@Gerry see my answer below... You can use my PPA, which mirrors my work I do on Debian packages. – oerdnj Mar 7 '13 at 11:47

I will (ab)use already answered question: How do I install PHP 5.4.0?

You could use a ppa to stay up-to-date with php. I use : Launchpad logo

It's now on 5.4. If you want use this ppa do this:

ppa:ondrej/php5 Launchpad logo (Click here for instructions on using PPAs.)

sudo add-apt-repository ppa:ondrej/php5
sudo apt-get update
sudo apt-get upgrade

If you don't have add-apt-repository binary do the following:

sudo apt-get install python-software-properties

For more, see the already answered question mentioned in the top.

share|improve this answer
Alright, this does install php 5.4. However, this doesn't seem to solve how to get php5-fpm in 5.4 flavor. – Seth Jeremi Malaki Apr 28 '13 at 3:39
Simple apt-get install php5-fpm will install php5-fpm in 5.4 flavor. What's output of apt-cache policy php5-fpm? – oerdnj Apr 28 '13 at 7:43 Please note that I have 11.04 and OP has 12.04. Could be also useful if someone pointed out the right way to install PHP-FPM 5.4 on 11.04. I've tried apt-get update && apt-get upgrade already. – Seth Jeremi Malaki Apr 28 '13 at 7:48
Natty is no longer supported. I do build packages only for supported releases. – oerdnj Apr 28 '13 at 9:19
Had to pick the version specifically, i.e. sudo apt-get install then sudo apt-get install to install/upgrade php5-fpm to php 5.4. (Got the hint from @oerdnj asking the output of apt-cache policy php5-fpm.) – notacouch Dec 16 '13 at 16:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.