Apt-get update through Tor
Solution 1
Install the apt-transport-tor
package and then:
Edit /etc/apt/sources.list
to add the prefix tor+
to your repositories.
deb tor+http://deb.debian.org/debian unstable main
deb-src tor+http://deb.debian.org/debian unstable main
This will allow apt to run over tor.
Note: Substitute http://deb.debian.org/debian unstable main
with the appropriate sources for your distribution.
Solution 2
You can use torsocks, It's shell wrapper to torify applications, to simplify the use of the Tor socks.
torsocks apt-get update
Solution 3
You must remove http://dl.google.com
from apt source the first way is remove from software center or edit /etc/apt/sources.list
with root access,Read it.
and if you use the kubuntu you can use software center
and choose source tap click on configure source software
and choose other tab remove http://dl.google.com
.
and after than :
sudo apt-get clean
sudo apt-get update
Solution 4
If you have installed Tor from terminal, you must have torify
. If so, simply you can pass the traffic of any script or program from tor.
First become root using sudo su
then run this:
torify apt-get update
Then you can update your Google Chrome in the regular way using
apt-get upgrade
I am in Iran so facing with same problem of yours. I just used this method to update my Chrome.
Related videos on Youtube
![Alexander](https://i.stack.imgur.com/WrJMm.jpg?s=256&g=1)
Alexander
Updated on September 18, 2022Comments
-
Alexander almost 2 years
I'm trying to update my apt-get list. In my country a lot of sites are blocked or have been blocked from companies.
When I use a proxy for the whole system I get errors, Tor works perfectly when browsing. Can I update
apt-get
through a connection from Tor? I mean I want to unblock the blocked sites using Tor connection, so I can performapt-get update
without errors.Edit: I'm using Ubuntu 13.10 and Tor 0.2.21
$ sudo apt-get update [sudo] password for alexander: Ign http://extras.ubuntu.com saucy InRelease Ign http://security.ubuntu.com saucy-security InRelease Ign http://us.archive.ubuntu.com saucy InRelease Hit http://extras.ubuntu.com saucy Release.gpg Get:1 http://dl.google.com stable InRelease [1,540 B] 100% [1 InRelease gpgv 1,540 B] [Waiting for headers] [Waiting for headers] [WaSplitting up/var/lib/apt/lists/partial/dl.google.com_linux_chrome_deb_dists_stabIgn http://dl.google.com stable InRelease E: GPG error: http://dl.google.com stable InRelease: Clearsigned file isn't valid, got 'NODATA' (does the network require authentication?
-
Braiam over 10 yearsWhat is the output of
sudo apt-get update
? -
Braiam over 10 yearsCan you run it again but now
sudo apt-get update -o Debug::Acquire::http=true
? -
animaletdesequia over 10 yearsFor all I know, there's problems accessint google servers trough tor, google detects all the connections coming from the same address and blocks it. You could try to remove google from your sources list and see if you get errors with other repositories or is just that one.
-
Alexander over 10 yearsE: Option Debug::Acquire::http: Configuration item specification must have an =<val>.
-
nilsonneto over 10 years@Alexander - please update your question with any responses - try not to add vital info in comments because they are often difficult to read. Thanks.
-
-
Mostafa Ahangarha about 8 yearsThis would stop Chrome from being updated while the question is there to find a way to update it
-
A1Gard about 8 years@MostafaAhangarha The chrome is not official Ubuntu repo, The chromium is official but there is not direct and prefect way to upgrade automate google chrome.
-
Mostafa Ahangarha about 8 yearsThen you are saying he should use chromium instead of Chrome which is not relevant to the question. Yet, I do not see this suggestion anywhere in your answer. You just simply remove Chrome from being updated which is not the answer for his question. He wants to update Google Chrome and because of the problems he explained, he cannot do it through a network without proxy (same problem I have). I suggested him to use
torify
to be able to pass his traffic through Tor network which can solve his problem as it did in my case as well. -
Mostafa Ahangarha about 8 yearsGoogle Chrome can be updated directly and perfectly like any other software you install on your Ubuntu. Just in few countries including Iran, Google company doesn't allow using some of its services including accessing the update for Chrome. As the solution, one need to use proxy. Best of luck
-
A1Gard about 8 yearsIt's not work for me...
-
Mostafa Ahangarha about 8 yearsWhat about
sudo torify apt-get update
? If not, what is the error? -
A1Gard about 8 yearsYes of curse ...
-
Mostafa Ahangarha about 8 yearsYou mean it still doesn't work? If not, is the Tor-browser working and connected before you run the command? It works perfectly for me.
-
ako almost 5 yearsIt worked for me. Tnx
-
Pablo Bianchi over 4 yearstorify is now just a wrapper around torsocks for backwards compatibility