How to Update Ubuntu Hardy to PHP 5.2.9

First upgrade your software as is.

>> sudo apt-get update

>> sudo apt-get upgrade

Then add the following to your /etc/apt/sources.list file.

>> sudo nano /etc/apt/sources.list

deb http://http.us.debian.org/debian stable all
deb http://security.debian.org/ stable/updates main contrib
deb http://packages.dotdeb.org/ stable all

Finally run the update to install PHP 5.2.9.

>> sudo apt-get update

>> sudo apt-get install php5-cli

>> sudo /etc/init.d/apache2 restart

This entry was posted in IT & Administration, Web & Software Development and tagged , , , . Bookmark the permalink.

4 Responses to How to Update Ubuntu Hardy to PHP 5.2.9

  1. Err http://http.us.debian.org stable/all Packages
    404 Not Found [IP: 204.152.191.39 80]

  2. aseire says:

    after nano /etc/apt/sources.list change
    apt-get update gives the error:

    W: Failed to fetch http://http.us.debian.org/debian/dists/stable/Release Unable to find expected entry all/binary-i386/Packages in Meta-index file (malformed Release file?)

  3. Kristopher Windsor says:

    Don’t run this if you’re on a modern version of Ubuntu. It will mess things up. :/

Leave a Reply

Your email address will not be published. Required fields are marked *