Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to run

sudo apt-get install libsqlite3-dev

But I'm getting this error:

E: Unable to locate package sqlite3

How can I fix this?

share|improve this question
up vote 6 down vote accepted

I just saw that your command is not complete. Try:

sudo apt-get install sqlite3 libsqlite3-dev

If still does not work, try the following:

Running the command:

 sudo apt-cache policy sqlite3

will give you the following output:

  Installed: (none)
  Candidate: 3.7.9-2ubuntu1.1
  Version table:
     3.7.9-2ubuntu1.1 0
        500 precise-updates/main amd64 Packages
     3.7.9-2ubuntu1 0
        500 precise/main amd64 Packages

It is visible that the package is in

Hence, check your repositories. Open the update manager, go to settings, and after typing your password, you will see the repositories selected:

enter image description here

Try the options I have selected, and you should be fine.

share|improve this answer
You don't need sudo to read apt-cache policy – Dmitry Pashkevich Aug 13 '13 at 10:23

I found the solution. Actually it's quite simple. I need to do a do a software update first (since this is a new install)

sudo apt-get update && sudo apt-get upgrade # Update software
sudo apt-get install libsqlite3-dev # Install packages
share|improve this answer

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.