Cannot install PHP5 using apt-get on UBUNTU

Asked by Gandalf

gparsons@ARRAGORN-UB:/etc/apt$ sudo apt-get install php5 libapache2-mod-php5
Reading package lists... Done
Building dependency tree
Reading state information... Done
I cannot install PHP5. Using the following command:
    sudo apt-get install php5 libapache2-mod-php5

I get the following. The last line keeps repeating itself continuously for several hours (incrementing the count each time). This ran for 8 hours without finishing. I assumed it was having problems with the repositories in Singapore, so I tried changing my repositories (changed the 'sg' prefix to 'us' in the sources.list file), but then the same command line just gave me errors and stopped immediately. So I restored sources.list, and of course still get the problem highlighted below.

Here is the message when I run the install using the above line and the sg repositories.

The following extra packages will be installed:
  apache2-mpm-prefork php5-common
Suggested packages:
  php-pear
The following packages will be REMOVED:
  apache2-mpm-worker
The following NEW packages will be installed:
  apache2-mpm-prefork libapache2-mod-php5 php5 php5-common
0 upgraded, 4 newly installed, 1 to remove and 4 not upgraded.
Need to get 2543kB/3196kB of archives.
After unpacking 6328kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://sg.archive.ubuntu.com gutsy/main libapache2-mod-php5 5.2.3-1ubuntu6 [2542kB]
Get:2 http://sg.archive.ubuntu.com gutsy/main libapache2-mod-php5 5.2.3-1ubuntu6 [2542kB]
Get:3 http://sg.archive.ubuntu.com gutsy/main libapache2-mod-php5 5.2.3-1ubuntu6 [2542kB]

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Solved by:
Jim Qode
Solved:
Last query:
Last reply:
Revision history for this message
Best Jim Qode (jimqode) said :
#1

It is most likely a problem with your repositories. You can change your repositories using Synaptic Package manager which can be found under System/Administration. You can find a repository list in the settings/repositories window.

Revision history for this message
Gandalf (noosamad) said :
#2

Thanks Jim Qode, that solved my question.