Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

when I gave the sudo apt-get install php5 command it responds with and error message "unable to locate php5"

share|improve this question
    
Could you please post the content of your /etc/apt/sources.list file? –  Nicolas Raoul Apr 27 '11 at 10:55
add comment

2 Answers

Well it's definitely in there (proof below and here).

oli@tim:~$ apt-cache policy php5
php5:
  Installed: (none)
  Candidate: 5.3.3-1ubuntu9.3
  Version table:
     5.3.3-1ubuntu9.3 0
        500 http://gb.archive.ubuntu.com/ubuntu/ maverick-updates/main i386 Packages
        500 http://security.ubuntu.com/ubuntu/ maverick-security/main i386 Packages
     5.3.3-1ubuntu9 0
        500 http://gb.archive.ubuntu.com/ubuntu/ maverick/main i386 Packages
oli@tim:~$ 
oli@tim:~$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.10
DISTRIB_CODENAME=maverick
DISTRIB_DESCRIPTION="Ubuntu 10.10"

Suggestions:

  • Is this a new system? Have you run sudo apt-get update yet?

  • Is your /etc/apt/sources.list hopelessly corrupted? At the very least it should have some of the following:

    deb http://archive.ubuntu.com/ubuntu/ maverick main restricted universe multiverse 
    deb http://archive.ubuntu.com/ubuntu/ maverick-security main restricted universe multiverse 
    deb http://archive.ubuntu.com/ubuntu/ maverick-updates main restricted universe multiverse 
    deb http://archive.canonical.com/ubuntu maverick partner
    
share|improve this answer
add comment

there is probably problem with your repository configuration...

post here output of

more /etc/apt/sources.list

php5 is in "main" repository, so you should have there some variant of

deb http://archive.ubuntu.com/ubuntu maverick main
share|improve this answer
    
You need maverick-security too to ensure you get the security fixes (very important for internet facing services). –  Oli Apr 27 '11 at 11:58
add comment

Your Answer

 
discard

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.