所以我在我的大学网络上,需要在开始使用互联网之前登录浏览器。我成功地完成了登录,但是在干净安装的Ubuntu上,当我尝试执行
但是当我运行
目前,该问题已经上报给我们学院的网络部门 :)
sudo apt update
时,我会得到以下输出:$ sudo apt update
Get:1 http://in.archive.ubuntu.com/ubuntu xenial InRelease [2,847 B]
Err:1 http://in.archive.ubuntu.com/ubuntu xenial InRelease
Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [2,854 B]
Err:2 http://security.ubuntu.com/ubuntu xenial-security InRelease
...
Get:3 http://in.archive.ubuntu.com/ubuntu xenial-updates InRelease [2,855 B]
Err:3 http://in.archive.ubuntu.com/ubuntu xenial-updates InRelease
...
Get:4 http://in.archive.ubuntu.com/ubuntu xenial-backports InRelease [2,857 B]
Err:4 http://in.archive.ubuntu.com/ubuntu xenial-backports InRelease
Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Fetched 11.4 kB in 0s (18.3 kB/s)
Reading package lists... Done
E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/xenial/InRelease Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
...
E: Some index files failed to download. They have been ignored, or old ones used instead.
但是当我运行
wget http://in.archive.ubuntu.com/ubuntu/dists/xenial/InRelease
时,我得到了这个成功的输出:2017-04-01 05:34:57 http://in.archive.ubuntu.com/ubuntu/dists/xenial/InRelease
Resolving in.archive.ubuntu.com (in.archive.ubuntu.com)... 91.189.88.162, 91.189.88.149, 91.189.88.152, ...
Connecting to in.archive.ubuntu.com (in.archive.ubuntu.com)|91.189.88.162|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 246846 (241K)
Saving to: ‘InRelease.3’
InRelease.3 100%[===================>] 241.06K 110KB/s in 2.2s
2017-04-01 05:35:00 (110 KB/s) - ‘InRelease.3’ saved [246846/246846]
明显地,我可以通过浏览器和wget
访问互联网,但是当我执行sudo apt
(或apt-get
)update时,出现了这个错误。
附注:这个问题与其他帖子不同,因为它们的解决方案似乎在我的情况下不起作用。
wget -SO /dev/null http://in.archive.ubuntu.com/ubuntu/dists/xenial/InRelease
wget -SO /dev/null http://archive.ubuntu.com/ubuntu/dists/xenial/InRelease
据我所知,这个问题只发生在我身上,而不是学校网络上的其他人。尽管按照说明设置了网络,仍然会出现这个问题。如果有更多帮助,将不胜感激。
编辑:事实证明,我们学院中有50%的人面临这个问题,而另外50%的人尽管硬件没有问题,在上周之前也进行了sudo apt update,但并未遇到此问题。感谢@David Foerster在整个过程中对我的帮助。目前,该问题已经上报给我们学院的网络部门 :)
wget -qO- http://in.archive.ubuntu.com/ubuntu/dists/xenial/InRelease | head
的输出是什么? - David Foerstersudo apt-get update
的输出是什么? - David Foerstersudo
默认情况下不会应用用户的环境变量。请尝试以下方式:sudo --preserve-env apt update
。另外,请记得在每次更改代理后打开一个新的终端窗口。 - Brent Bradburn