LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Problems on installing Tor on Debian/Xfce (https://www.linuxquestions.org/questions/linux-software-2/problems-on-installing-tor-on-debian-xfce-570567/)

bojingles 07-18-2007 10:51 PM

Problems on installing Tor on Debian/Xfce
 
I open a terminal and type in "apt-get install tor" and receive:

E: Could not open lock file /var/lib/dpkg/lock - open (13 Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

My linux experience is around a couple hours. Is this similar to some sort of "admin" type restriction? I'm not sure I understand the error message. Any help would be appreciated.

AlucardZero 07-19-2007 11:14 AM

Code:

sudo apt-get install tor
You need to be root (the super-user) to install things like that. "sudo" will ask you for your password, then run the command you give it as root. If sudo doesn't work, do "su" then enter root's password, then do the apt-get command (no sudo needed when you are root), then Google how to give yourself sudo access.

On a related note, I recommend adding the following line to your /etc/apt/sources.list:
Code:

deb    http://mirror.noreply.org/pub/tor VERSION main
. Replace VERSION with "etch" or "sarge" or "lenny", whichever you are running. I recommend this because tor is only in Debian's unstable ("sid") repository, and is still a version behind. So if you want to run the latest version of tor, or are not running your system on unstable, you need that line (after saving the file -- which btw you need to edit as root -- do an "apt-get update" and then do the apt-get install).

bojingles 07-19-2007 12:06 PM

How do I run the command to give it to me as root? I've googled it but I can't find it. :scratch:

AlucardZero 07-19-2007 12:44 PM

?


At the command prompt, type
Code:

sudo apt-get install tor
It will ask you for YOUR password.

If you get USER is not in the sudoers file. This incident will be reported. or similar, instead try su, which will ask you for ROOT's password, when you give it you'll be at a prompt that ends with a #, this is the root prompt. Type apt-get install tor then. Type exit to get back your non-privileged-user prompt. And then you can Google how to add yourself to the sudoers file so you can just use sudo and not have to go through su.

fair_is_fair 07-19-2007 12:51 PM

Open a console - type "su" - enter password for root - type "apt-get update" - type "apt-get install tor". Do not type in the "s.

You will, most likely, want the Privoxy package too.

You will not need to update apt again although it should be updated every couple of days or more.

The tricky part with Privoxy is navagating to the "etc" folder. There you will find the Privoxy folder. Open the folder and open the "conf" file. You will need to add "forward-socks4a / localhost:9050 ." without the quotes of course. Make sure there is no "#" in front. Make sure to add the "." one space after 9050. You need to edit this file as root. Set your browser to use proxy 127.0.0.1 with port 8118 and you are good to go. When tor slows down or starts acting up you will need these commands to start and restart tor.

/etc/init.d/tor stop
/etc/init.d/tor start

Your Privoxy "conf" should look like mine below.


# Sample Configuration File for Privoxy
#
forward-socks4a / localhost:9050 .
#
# Id: config,v
#
# Copyright (C) 2001-2006 Privoxy Developers http://privoxy.org

unSpawn 07-19-2007 01:01 PM

Quote:

Your Privoxy "conf" should look like mine below.
Please note this is not the only configurable part of the config. The only thing this does is forward traffic to the default TOR port.


Quote:

You will, most likely, want the Privoxy package too.
...and if you find Privoxy gets way slow after loading huge custom rulesets there's a lightweight alternative: Polipo.

fair_is_fair 07-19-2007 01:03 PM

You may want to install Synaptic. It is great for searching out packages and getting descriptions for them. It is handy for installing single programs. Do not do any major upgrades via Synaptic though.

You can add "http://www.debian-multimedia.org/" to your repository list or sources list in Apt-get to get much needed extras.

fair_is_fair 07-19-2007 01:10 PM

Good info unSpawn. I was looking at Polipo the other day. Can you give us some configuration details. I wouldn't mind trying it out.

bojingles 07-19-2007 02:14 PM

I type in "su" and get the password prompt, however when I enter my password, it says authentication failure. I know I have typed in my password correctly. Why would it say this?

AlucardZero 07-19-2007 02:36 PM

Are you entering the password to your normal user account, or to root's account? With su you need to enter root's password. Assuming it has one.

bojingles 07-19-2007 02:45 PM

I am entering my user password. How do I find the root password, or if it doesnt have one, make one/use su?

bojingles 07-19-2007 04:42 PM

I found out how to set the root password and did so, but I used the command and received this:

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package tor

What went wrong?

AlucardZero 07-20-2007 10:44 AM

You did not apt-get update, or you do not have the unstable or mirror.noreply.org/pub/tor repositories enabled in your /etc/apt/sources.list. If the latter, add the line like I said in my first post, then apt-get update, then apt-get install (all of these must be done as root).

bojingles 07-20-2007 01:55 PM

I've messed around for a few more hours today and I believe I finally have it correct, however I need socks support. Sourceforge is currently down, that site that holds privoxy, so I will try the other mentioned program and see if that gives me the support.

Thanks a lot for the help all of you, this is quite a challenge at first. However, the more I try the more experience I get, and this is turning out to be enjoyable.

AlucardZero 07-20-2007 02:09 PM

You can just apt-get install privoxy.


All times are GMT -5. The time now is 04:47 AM.