SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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.
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
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
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
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.
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
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
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
Wish I had a good link to some docs that would explain it better than I do but I haven't. Sorry.
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
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
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'.
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.
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).
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?
If you don't need Privoxy's filtering capabilities you might like Polipo as lightweight conduit replacement into TOR.
Quote:
Originally Posted by montag
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
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".
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.