1

I am trying to install a pre-compiled sqlite version 3 (sqlite3) binary in linux. I created a directory /home/username/src and I placed the zip file in the directory then unzipped the file. What I was left with was sqlite3. When I try to use it I get an error saying sqlite3 is not installed. I have tried the commands:

install sqlite3
make install

2 Answers2

2

You should not download sqlite yourself but install it from the repositories of your distributions using the package manager. On Debian/Ubuntu you would do:

 sudo apt-get install sqlite3 libsqlite3-0 libsqlite3-dev

Depending on what programming language you are using, you should also install the proper bindings. Those are often available as packages as well.

Kim
  • 729
  • 1
  • 5
  • 12
  • Would you be so kind to read my answer before complaining? I explicitly mention that this is for debian/ubuntu. If the OP needs instructions for a different distribution, he can say so and I will amend my answer. – Kim May 12 '11 at 16:25
  • @kim-stebel: you are completely right. sorry. – pconcepcion May 12 '11 at 16:42
  • Also, the OP probably only needs `sqlite3`. Of course, depending on what he needs it for, he may only need `libsqlite3-0`, or he may only need `libsqlite3-dev`. – James May 12 '11 at 22:23
  • well, this question started out on SO, so I assumed he needs -dev too. Anyway, a few extra packages never hurt anyone. – Kim May 12 '11 at 22:36
1

Try running it like:

cd /home/username/src
./sqlite3

Note the leading "./" there. You can also move it into /usr/local/bin, which is probably in your $PATH, verify with:

echo $PATH

and then you can run it from anywhere like:

sqlite3 
Steve Kehlet
  • 1,055
  • 1
  • 10
  • 16