Apt-get update to tor

我正在尝试更新我的apt-get列表。 在我的国家,许多网站被封锁或被公司封锁。

当我在整个系统中使用代理时,我会遇到错误,在浏览时可以很好地工作。 我的问题是我可以通过tor的连接更新apt-get吗? 我的意思是我想使用tor连接解锁被阻止的网站,这样我就可以执行“apt-get update”而不会出现错误…

提前致谢。

编辑BTW:我使用的是Ubuntu 13.10和Tor 0.2.21

alexander@Alexander-PC:~$ 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? 

您必须从apt源删除http://dl.google.com ,第一种方法是从软件中心删除或使用root访问权限编辑/etc/apt/sources.list , 阅读它。

如果您使用kubuntu,您可以使用software center并选择源点击configure source software然后选择其他选项卡删除http://dl.google.com

之后:

 sudo apt-get clean sudo apt-get update 

如果您已从终端安装Tor,则必须具有torify 。 如果是这样,您只需从tor传递任何脚本或程序的流量。

首先使用sudo su成为root然后运行:

 torify apt-get update 

然后,您可以使用常规方式更新Google Chrome

 apt-get upgrade 

我在伊朗面对同样的问题。 我刚用这种方法来更新我的Chrome。

你可以使用torsocks ,它的shell包装,以简化tor袜子的使用。

 torsocks apt-get update