Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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

2 Answers 2

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

oli@tim:~$ apt-cache policy php5
  Installed: (none)
  Candidate: 5.3.3-1ubuntu9.3
  Version table:
     5.3.3-1ubuntu9.3 0
        500 maverick-updates/main i386 Packages
        500 maverick-security/main i386 Packages
     5.3.3-1ubuntu9 0
        500 maverick/main i386 Packages
oli@tim:~$ cat /etc/lsb-release 


  • 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 maverick main restricted universe multiverse 
    deb maverick-security main restricted universe multiverse 
    deb maverick-updates main restricted universe multiverse 
    deb maverick partner
share|improve this answer

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 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

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.