As of the 28 February 2014, Drupal 8 now requires a minimum PHP version of 5.4.2. For background information read the drupal.org issue.
This places everyone running Ubuntu 12.04 LTS in an awkward situation as the PHP version bundled with this release is PHP 5.3.10.
Luckily there are options to solve this:
Perform a dist-upgrade to 14.04 LTS
This may not be the easiest option, but I mention it for completeness, as this newer version of Ubuntu (Trusty Tahr) contains PHP 5.5.9 out of the box.
Add a PPA and install newer a newer version of PHP
For most people this will be the easiest option. For PHP 5.4.x run the command:
or for PHP 5.5.x run:
And then update your packages:
The PPA maintainer has more information on the launchpad site https://launchpad.net/~ondrej/+archive/php5
I was getting the message “The following packages have been kept back” when running the upgrade command earlier
This was solved by manually installing the packages:
Update 2 June 2015
An alternative to the above command is
This will update the packages, but will not update the Ubuntu release (hattip @Ben Coleman and @abowman).
Let me know if this worked for you in the comments, or if you have another way to easily update PHP on your stack.