为什么我没法在 Ubuntu14.04 上通过 apt-get 安装软件?

2017-08-09 09:50:12 +08:00
 yangonee

背景:在一台旧 Android 手机(系统版本 4.0 )上通过终端模拟器安装了 Ubuntu14.04 ,切换了安装源为 163 的。

1、系统信息:

root@localhost:~# cat /etc/issue
Ubuntu Trusty Tahr (development branch) \n \l

2、切换源以后,update 后出现很多 404 和 failed:

root@localhost:~# sudo apt-get update
Ign http://mirrors.163.com trusty InRelease        
Get:1 http://mirrors.163.com trusty-security InRelease [65.9 kB]
Get:2 http://mirrors.163.com trusty-updates InRelease [65.9 kB]                
Get:3 http://mirrors.163.com trusty-proposed InRelease [65.9 kB]               
Hit http://mirrors.163.com trusty-backports InRelease                          
Hit http://mirrors.163.com trusty Release.gpg                                  
Get:4 http://mirrors.163.com trusty-security/main Translation-en [347 kB]      
Get:5 http://mirrors.163.com trusty-security/multiverse Translation-en [2201 B]
Get:6 http://mirrors.163.com trusty-security/restricted Translation-en [3491 B]
Get:7 http://mirrors.163.com trusty-security/universe Translation-en [103 kB]  
Get:8 http://mirrors.163.com trusty-updates/main Translation-en [493 kB]       
Get:9 http://mirrors.163.com trusty-updates/multiverse Translation-en [7430 B] 
Get:10 http://mirrors.163.com trusty-updates/restricted Translation-en [3978 B]
Get:11 http://mirrors.163.com trusty-updates/universe Translation-en [225 kB]  
Get:12 http://mirrors.163.com trusty-proposed/main Translation-en [21.4 kB]    
Get:13 http://mirrors.163.com trusty-proposed/multiverse Translation-en [28 B] 
Get:14 http://mirrors.163.com trusty-proposed/restricted Translation-en [281 B]
Get:15 http://mirrors.163.com trusty-proposed/universe Translation-en [10.3 kB]
Hit http://mirrors.163.com trusty-backports/main Translation-en                
Hit http://mirrors.163.com trusty-backports/multiverse Translation-en
Hit http://mirrors.163.com trusty-backports/restricted Translation-en
Hit http://mirrors.163.com trusty-backports/universe Translation-en
Hit http://mirrors.163.com trusty Release
Hit http://mirrors.163.com trusty/main Translation-en
Hit http://mirrors.163.com trusty/multiverse Translation-en
Hit http://mirrors.163.com trusty/restricted Translation-en
Hit http://mirrors.163.com trusty/universe Translation-en
Err http://mirrors.163.com trusty-security/main armhf Packages
  404  Not Found [IP: 123.58.190.236 80]
Err http://mirrors.163.com trusty-security/restricted armhf Packages
  404  Not Found [IP: 123.58.190.236 80]
Err http://mirrors.163.com trusty-security/universe armhf Packages
  404  Not Found [IP: 123.58.190.236 80]
Err http://mirrors.163.com trusty-security/multiverse armhf Packages
  404  Not Found [IP: 123.58.190.236 80]
Err http://mirrors.163.com trusty-updates/main armhf Packages
  404  Not Found [IP: 123.58.190.236 80]
Err http://mirrors.163.com trusty-updates/restricted armhf Packages
  404  Not Found [IP: 123.58.190.236 80]
Err http://mirrors.163.com trusty-updates/universe armhf Packages
  404  Not Found [IP: 123.58.190.236 80]
Err http://mirrors.163.com trusty-updates/multiverse armhf Packages
  404  Not Found [IP: 123.58.190.236 80]
Err http://mirrors.163.com trusty-proposed/main armhf Packages
  404  Not Found [IP: 123.58.190.236 80]
Err http://mirrors.163.com trusty-proposed/restricted armhf Packages
  404  Not Found [IP: 123.58.190.236 80]
Err http://mirrors.163.com trusty-proposed/universe armhf Packages
  404  Not Found [IP: 123.58.190.236 80]
Err http://mirrors.163.com trusty-proposed/multiverse armhf Packages
  404  Not Found [IP: 123.58.190.236 80]
Err http://mirrors.163.com trusty-backports/main armhf Packages
  404  Not Found [IP: 123.58.190.236 80]
Err http://mirrors.163.com trusty-backports/restricted armhf Packages
  404  Not Found [IP: 123.58.190.236 80]
Err http://mirrors.163.com trusty-backports/universe armhf Packages
  404  Not Found [IP: 123.58.190.236 80]
Err http://mirrors.163.com trusty-backports/multiverse armhf Packages
  404  Not Found [IP: 123.58.190.236 80]
Err http://mirrors.163.com trusty/main armhf Packages
  404  Not Found [IP: 123.58.190.236 80]
Err http://mirrors.163.com trusty/restricted armhf Packages
  404  Not Found [IP: 123.58.190.236 80]
Err http://mirrors.163.com trusty/universe armhf Packages
  404  Not Found [IP: 123.58.190.236 80]
Err http://mirrors.163.com trusty/multiverse armhf Packages
  404  Not Found [IP: 123.58.190.236 80]
Fetched 1414 kB in 6min 23s (3685 B/s)
W: Failed to fetch http://mirrors.163.com/ubuntu/dists/trusty-security/main/binary-armhf/Packages  404  Not Found [IP: 123.58.190.236 80]

W: Failed to fetch http://mirrors.163.com/ubuntu/dists/trusty-security/restricted/binary-armhf/Packages  404  Not Found [IP: 123.58.190.236 80]

W: Failed to fetch http://mirrors.163.com/ubuntu/dists/trusty-security/universe/binary-armhf/Packages  404  Not Found [IP: 123.58.190.236 80]

W: Failed to fetch http://mirrors.163.com/ubuntu/dists/trusty-security/multiverse/binary-armhf/Packages  404  Not Found [IP: 123.58.190.236 80]

W: Failed to fetch http://mirrors.163.com/ubuntu/dists/trusty-updates/main/binary-armhf/Packages  404  Not Found [IP: 123.58.190.236 80]

W: Failed to fetch http://mirrors.163.com/ubuntu/dists/trusty-updates/restricted/binary-armhf/Packages  404  Not Found [IP: 123.58.190.236 80]

W: Failed to fetch http://mirrors.163.com/ubuntu/dists/trusty-updates/universe/binary-armhf/Packages  404  Not Found [IP: 123.58.190.236 80]

W: Failed to fetch http://mirrors.163.com/ubuntu/dists/trusty-updates/multiverse/binary-armhf/Packages  404  Not Found [IP: 123.58.190.236 80]

W: Failed to fetch http://mirrors.163.com/ubuntu/dists/trusty-proposed/main/binary-armhf/Packages  404  Not Found [IP: 123.58.190.236 80]

W: Failed to fetch http://mirrors.163.com/ubuntu/dists/trusty-proposed/restricted/binary-armhf/Packages  404  Not Found [IP: 123.58.190.236 80]

W: Failed to fetch http://mirrors.163.com/ubuntu/dists/trusty-proposed/universe/binary-armhf/Packages  404  Not Found [IP: 123.58.190.236 80]

W: Failed to fetch http://mirrors.163.com/ubuntu/dists/trusty-proposed/multiverse/binary-armhf/Packages  404  Not Found [IP: 123.58.190.236 80]

W: Failed to fetch http://mirrors.163.com/ubuntu/dists/trusty-backports/main/binary-armhf/Packages  404  Not Found [IP: 123.58.190.236 80]

W: Failed to fetch http://mirrors.163.com/ubuntu/dists/trusty-backports/restricted/binary-armhf/Packages  404  Not Found [IP: 123.58.190.236 80]

W: Failed to fetch http://mirrors.163.com/ubuntu/dists/trusty-backports/universe/binary-armhf/Packages  404  Not Found [IP: 123.58.190.236 80]

W: Failed to fetch http://mirrors.163.com/ubuntu/dists/trusty-backports/multiverse/binary-armhf/Packages  404  Not Found [IP: 123.58.190.236 80]

W: Failed to fetch http://mirrors.163.com/ubuntu/dists/trusty/main/binary-armhf/Packages  404  Not Found [IP: 123.58.190.236 80]

W: Failed to fetch http://mirrors.163.com/ubuntu/dists/trusty/restricted/binary-armhf/Packages  404  Not Found [IP: 123.58.190.236 80]

W: Failed to fetch http://mirrors.163.com/ubuntu/dists/trusty/universe/binary-armhf/Packages  404  Not Found [IP: 123.58.190.236 80]

W: Failed to fetch http://mirrors.163.com/ubuntu/dists/trusty/multiverse/binary-armhf/Packages  404  Not Found [IP: 123.58.190.236 80]

E: Some index files failed to download. They have been ignored, or old ones used instead.

3、安装任意软件,提示如下:

root@localhost:~# sudo apt-get install Nginx
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package Nginx

请问各位大神,如何处理是好?

3515 次点击
所在节点    问与答
15 条回复
acidsweet
2017-08-09 09:52:28 +08:00
软件源问题啊,换一个源
yangonee
2017-08-09 09:53:26 +08:00
@acidsweet 从系统自带源换到了 163 的,然后又换到了清华大学的,都不行。。。
akwIX
2017-08-09 09:55:01 +08:00
可能被劫持了,用 https 的源
Zzzzzzzzz
2017-08-09 09:57:07 +08:00
不是劫持的问题, 大部分源只提供 x86、amd64 以及源码的包
切回官方源就好了, 慢点就慢点吧
acidsweet
2017-08-09 09:58:54 +08:00
@yangonee 噗,不能在软件源里先测试么,我用的 linuxmint 是有这个功能的(:3 )
Fishdrowned
2017-08-09 10:00:35 +08:00
要用 port 源,163 是 x86 的,架构不一样
Tink
2017-08-09 10:02:06 +08:00
拜托你加的是 x86 的源
mrcn
2017-08-09 10:05:25 +08:00
试试先 apt-get update
mrcn
2017-08-09 10:05:50 +08:00
@mrcn 抱歉,没看清帖子
Zzzzzzzzz
2017-08-09 10:08:00 +08:00
等等, 不对, 你这是 ubuntu, 不是 debian 啊, 我记得 ubuntu 官方也没提供过 arm 源啊
xratzh
2017-08-09 10:15:24 +08:00
@Zzzzzzzzz 有的,树莓派也有 ubuntu mate 的支持。楼主试试 ustc,以前倒腾过。ustc 有专门的 ubuntu arm 源,其他构架的也有,tuna 似乎没这么全,更别说 163 了。
Death
2017-08-09 10:16:22 +08:00
你需要用这个源
http://ports.ubuntu.com
Death
2017-08-09 10:19:11 +08:00
一般其他架构的话用默认的源就好了,速度不理想用代理就是了。
yangonee
2017-08-09 10:27:13 +08:00
@Zzzzzzzzz 谢谢,我知道原因了。
yangonee
2017-08-09 10:58:19 +08:00
@xratzh 大赞,果然 USTC 有

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/381552

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX