How can I install Tor from the source code in the Git repository?
To compile and install Tor from git follow these steps:
Step 0: Make sure you have
git, a working "C compiler" and "GNU make" installed on your linux box. You also need
libssl-devlibraries before you start.
If you're on debian/ubuntu type:
sudo apt-get install git build-essential automake libevent-dev libssl-dev zlib1g-dev
Step 1: Clone Tor from git.torproject.org
git clone https://git.torproject.org/tor.git
- Step 3: run
- Step 4: run
./configure --disable-asciidocif you don't want to build the manpages.
(See 'note' if you get error at this step)
- Step 5: run
- Step 6 (optional): run
Note: If you have problems finding libraries at step 4 try the following instead:
CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" \ ./configure
And if you have mysterious
autoconffailures while linking openssl, consider setting your
LD_LIBRARY_PATHto the openssl lib directory.
setenv LD_LIBRARY_PATH /usr/your_username/lib.
see INSTALL for more details.
I very rarely make install at the end. Once I've run make, I have a src/or/tor binary and I can just run it in place. That way I don't have to worry about smearing anything over my filesystem.
I added "make install" just to fit the question. Maybe it'd be better to change the question to "How to compile Tor from git?" and remove "make install"?