LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 02-25-2008, 05:15 AM   #1
montag
LQ Newbie
 
Registered: Feb 2008
Distribution: Slackware 12.0
Posts: 10

Rep: Reputation: 0
Just Installed Slackware 12.0: Issue With Tor


I just did a full install of Slackware 12.0 on a spare machine that I had lying around. I have a small amount of Linux experience, but I figure if I am really going to learn this stuff I should take it head on and use Slackware. Low level stuff interests me anyway.

My problem arose when I tried to install Tor. I probably could eventually hack together an answer by Googling and reading various forum posts, however, I am treating this as an exercise. I really want to understand what is going on here so I can solve these problems independently in the future.

I downloaded The Tor source from the website and tried to build it using ./configure (is build the correct term?). I got an error saying that it could not find a linkable libevent. I Googled libevent and a quick scan over the results revealed to me that libevent is a library. I went to the homepage and downloaded the source for that. I installed it on root and moved the directory to user/local/lib (was that necessary?). I think the install went just find, I did not get any warning/error messages. In my user/local/lib directory I have the following things related to libevent:
libevent-1.3e/, libevent.a, and libevent.la. I know where the directory came from (I moved it there), but what are the other files. Are those a result of the install that I did? Anyway, I go back to Tor and try to build it again. I still get the same error message. I take a look at the README online and it says to try ./configure --with-libevent-dir=/usr/local instead. I try this, and still no luck.

At this point I am stuck and I am not really sure what the message means when it says that that there is no linkable libevent. I suspect that my problem might have something to do with permissions. I am attempting to install Tor on root and I did install libevent on root (I am not logged in as root though, don't worry :-p). What exactly is this concept of linking? Is the fact that I am logged in as a normal user preventing the Tor program from accessing libevent in user/local/lib?

I actually also have a separate but slightly related question. I have programmed in C++ before so I think it is pretty safe to guess that when I type make, I am running the makefile that compiles the program. And make install compiles the installer? I can also guess from my basic knowledge that ./configure is running an executable. Is the purpose of this executable to determine the compatibility of the system? Does it modify things about the program depending on what it finds? Just random thoughts/questions I had when I was trying to do this.

Sorry about the big block of text :-(. I hope I explained everything in a clear and readable way. Thanks for taking the time to read my post.

~montag
 
Old 02-25-2008, 06:05 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 21,615
Blog Entries: 47

Rep: Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413
Quote:
Originally Posted by montag View Post
I downloaded The Tor source from the website and tried to build it using ./configure (is build the correct term?). I got an error saying that it could not find a linkable libevent. I Googled libevent
Try to read the README included in the tarball. Saves time since they often say which dependencies need to be met.


Quote:
Originally Posted by montag View Post
I installed it on root and moved the directory to user/local/lib (was that necessary?).
No, use ye aulde mantra: './configure; make; make install'. Or 'make -n install' between 'make' and 'make install' if you want to see what goes where.


Quote:
Originally Posted by montag View Post
I still get the same error message.
Above mantra should fix that. If not, see if /etc/ld.so.conf has an entry for /usr/local/lib (or 'ldconfig -p|grep local/lib'), or else you could nudge compile / linkstage on using 'export CFLAGS=-I/path/to/includes' and 'export LDFLAGS=/path/to/lib' to point to where includes and libraries live (usually only necessary when you compile static and throw away libs anyway).


Quote:
Originally Posted by montag View Post
I actually also have a separate but slightly related question.
Wish I had a good link to some docs that would explain it better than I do but I haven't. Sorry.
 
Old 02-25-2008, 06:10 AM   #3
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,063

Rep: Reputation: 221Reputation: 221Reputation: 221
You may also need to run 'ldconfig' as root after installing library dependencies.
 
Old 02-25-2008, 06:14 AM   #4
montag
LQ Newbie
 
Registered: Feb 2008
Distribution: Slackware 12.0
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks for the detailed reply. A lot of that went over my head, so I hope you don't mind if I ask a few questions about what you said.

Quote:
Originally Posted by unSpawn View Post
No, use ye aulde mantra: './configure; make; make install'. Or 'make -n install' between 'make' and 'make install' if you want to see what goes where.
So, from how I understand this, I should just extract the tar into the home directory of the user and run ./configure; make; make install' from there? Can I safely remove the directory once the install is done?

Quote:
Originally Posted by unSpawn View Post
Above mantra should fix that. If not, see if /etc/ld.so.conf has an entry for /usr/local/lib (or 'ldconfig -p|grep local/lib'), or else you could nudge compile / linkstage on using 'export CFLAGS=-I/path/to/includes' and 'export LDFLAGS=/path/to/lib' to point to where includes and libraries live (usually only necessary when you compile static and throw away libs anyway).
I actually had already checked that file, and it does contain that entry. However, you might have made me realize what the problem is. I actually ended up following the steps in this guide. I ran the install for libevent with --disable-shared --enable-static. Does it meant that the library is temporary, or something like that? That would make sense, because the guide is written for compiling Tor on Slackware and then moving it to another system. How can I undo the installation so I can redo it without the static option?

Quote:
Originally Posted by unSpawn View Post
Wish I had a good link to some docs that would explain it better than I do but I haven't. Sorry.
Thats ok, your reply was very informative. :-)

~montag

Last edited by montag; 02-25-2008 at 06:27 AM.
 
Old 02-25-2008, 07:12 AM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 21,615
Blog Entries: 47

Rep: Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413
Quote:
Originally Posted by montag View Post
A lot of that went over my head
NP, you could read basic docs like Rute, TLDP, Slackbook, the Slackware Bible and such: see the sticky in this forum.


Quote:
Originally Posted by montag View Post
So, from how I understand this, I should just extract the tar into the home directory of the user and run ./configure; make; make install' from there? Can I safely remove the directory once the install is done?
Only 'make install' needs root account privileges. One thing you might want to do is keep some sort of admin log and jot down what you configured/added/changed. (BTW there are Slackware repos that contain TOR and Libevent.) Once done you can remove the build directory.


Quote:
Originally Posted by montag View Post
How can I undo the installation so I can redo it without the static option?
If packages don't provide 'make uninstall' or you don't use installwatch or equivalent then output of 'make -n install' should be helpful. If nothing else changed in /some/path you could use something like 'find /some/path -cnewer /path/to/builddir/libevent.la'.
 
Old 02-25-2008, 07:33 AM   #6
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,700
Blog Entries: 1

Rep: Reputation: 374Reputation: 374Reputation: 374Reputation: 374
May I suggest that in addition to learning how to compile from source as unSpawn suggested, you also investigate src2pkg, which is a tremendosly useful tool for creating Slackware packages from source code compiles. By creating Slackware packages, src2pkg allows you to manage the software with all the usual Slackware tools, which can make life much easier down the road.
 
Old 02-25-2008, 01:18 PM   #7
montag
LQ Newbie
 
Registered: Feb 2008
Distribution: Slackware 12.0
Posts: 10

Original Poster
Rep: Reputation: 0
Thank you all for the excellent advice. The good news is that, thanks to your posts, the problem has been solved. I guess the issue was that I installed libevent with the static option. After reinstalling it with no options, Tor installed just fine. I also installed Privoxy and edited the configuration file. I as far as I can tell, it is all working smoothly. I will have to configure my other applications besides FireFox to work with Tor, but that is a problem for another day.

I actually have a question about user groups that relates to my installation of Privoxy. In the INSTALL file, it suggested the following:

Quote:
It is also strongly recommended to not run Privoxy as root. You should
configure/install/run Privoxy as an unprivileged user, preferably by creating a
"privoxy" user and group just for this purpose. See your local documentation
for the correct command line to do add new users and groups (something like
adduser, but the command syntax may vary from platform to platform).

/etc/passwd might then look like:

privoxy:*:7777:7777:privoxy proxy:/no/home:/no/shell


And then /etc/group, like:

privoxy:*:7777:


Some binary packages may do this for you.
I edited the configuration files like it suggested, and I understand the wisdom in not running Privoxy as root. Am I correct in my understanding that adding my unprivileged users to the Privoxy group that I created gives the user root powers with respect to Privoxy only?

~montag
 
Old 02-28-2008, 07:07 AM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 21,615
Blog Entries: 47

Rep: Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413Reputation: 1413
Quote:
Originally Posted by montag View Post
I also installed Privoxy
If you don't need Privoxy's filtering capabilities you might like Polipo as lightweight conduit replacement into TOR.


Quote:
Originally Posted by montag View Post
I will have to configure my other applications besides FireFox to work with Tor
Your search keywords are "SOCKS" and "socksify".


Quote:
Originally Posted by montag View Post
Am I correct in my understanding that adding my unprivileged users to the Privoxy group that I created gives the user root powers with respect to Privoxy only?
By executing commands resulting in what the docs say you should do, you have created a group and user account for user "privoxy" to the daemon processes can run under its own account, and you have not "added your unprivileged users to the Privoxy group".
 
Old 02-28-2008, 07:41 AM   #9
hitest
Senior Member
 
Registered: Mar 2004
Location: Prince Rupert, B.C., Canada
Distribution: Slackware, OpenBSD
Posts: 3,310

Rep: Reputation: 270Reputation: 270Reputation: 270
Smile

Post removed by me as issue solved:-)

Last edited by hitest; 02-28-2008 at 07:42 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Boot Loader issue : Installed to USB Hard disk :( chittu Linux - Newbie 5 05-15-2007 09:34 AM
Dual boot windows/slackware, but slackware installed first? Cryptic_K Slackware 3 11-20-2006 12:49 PM
Dumb newbie issue: firefox-0.8 cant run after installed... michelbehr Linux - Software 16 03-30-2004 12:08 AM
Installed Slackware, but don't see everything that installed alpinewonder Slackware 4 07-17-2003 10:51 PM


All times are GMT -5. The time now is 03:25 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration