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

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 compiled sqlite3 from source code, version 3.6.16. I used --prefix=/usr/bin as my only compiling option.

The binaries compiled and installed correctly, but at the directory /usr/bin/sqlite3/bin. So the application sits at /usr/bin/sqlite3/bin/sqlite3.

Now, how do I "tell Linux" that sqlite3 is installed to there? So when I run which sqlite3 it would print /usr/bin/sqlite3/bin/sqlite3?

I need this version specifically of sqlite3 for compiling a RubyGem; sqlite3-ruby, v1.3.0 or higher.

I assume I will be adding a PATH or something to my ~/.profile and then running source .profile to reload the changes. What is "telling Linux" where applications are installed to called? symlinks?

share|improve this question
I think the title needs moderation, because I didn't know what else to call it, but it's vague and ambiguous. I don't know what to call this problem! lol – dmanexe May 31 '11 at 20:07
I would recommend calling it something like "need alias or symlink for install path" but I'm not sure that's any easier. I flagged the post, so that hopefully a mod will look at it and perhaps edit the title. – koanhead May 31 '11 at 22:29
up vote 1 down vote accepted

Typically, when compiling source, I would use something similar to the following:


I suspect that this will put everything where you expect it to be.

share|improve this answer

Try editing ~/.bashrc to include this line:

export PATH=$PATH:/usr/bin/sqlite3/bin/

Another way of doing without modifying the path is to create a symlink:

sudo ln -s /usr/bin/sqlite3/bin/sqlite3 /usr/local/bin/sqlite3

Be aware that if you've installed sqlite3's package, its executable file will conflict with your newly compiled version. You're going to have to run /usr/bin/sqlite3/bin/sqlite3 explicitly.

BTW, using --prefix=/usr/bin as a compiling option is not a very good idea, I would recommend --prefix=/usr/local instead.

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.