V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
yangonee
V2EX  ›  问与答

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

  •  
  •   yangonee · 2017-08-09 09:50:12 +08:00 · 3481 次点击
    这是一个创建于 2654 天前的主题,其中的信息可能已经有所发展或是发生改变。

    背景:在一台旧 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
    

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

    15 条回复    2017-08-09 10:58:19 +08:00
    acidsweet
        1
    acidsweet  
       2017-08-09 09:52:28 +08:00
    软件源问题啊,换一个源
    yangonee
        2
    yangonee  
    OP
       2017-08-09 09:53:26 +08:00
    @acidsweet 从系统自带源换到了 163 的,然后又换到了清华大学的,都不行。。。
    akwIX
        3
    akwIX  
       2017-08-09 09:55:01 +08:00 via Android
    可能被劫持了,用 https 的源
    Zzzzzzzzz
        4
    Zzzzzzzzz  
       2017-08-09 09:57:07 +08:00
    不是劫持的问题, 大部分源只提供 x86、amd64 以及源码的包
    切回官方源就好了, 慢点就慢点吧
    acidsweet
        5
    acidsweet  
       2017-08-09 09:58:54 +08:00
    @yangonee 噗,不能在软件源里先测试么,我用的 linuxmint 是有这个功能的(:3 )
    Fishdrowned
        6
    Fishdrowned  
       2017-08-09 10:00:35 +08:00 via Android   ❤️ 1
    要用 port 源,163 是 x86 的,架构不一样
    Tink
        7
    Tink  
       2017-08-09 10:02:06 +08:00
    拜托你加的是 x86 的源
    mrcn
        8
    mrcn  
       2017-08-09 10:05:25 +08:00 via Android
    试试先 apt-get update
    mrcn
        9
    mrcn  
       2017-08-09 10:05:50 +08:00 via Android
    @mrcn 抱歉,没看清帖子
    Zzzzzzzzz
        10
    Zzzzzzzzz  
       2017-08-09 10:08:00 +08:00
    等等, 不对, 你这是 ubuntu, 不是 debian 啊, 我记得 ubuntu 官方也没提供过 arm 源啊
    xratzh
        11
    xratzh  
       2017-08-09 10:15:24 +08:00 via iPhone   ❤️ 1
    @Zzzzzzzzz 有的,树莓派也有 ubuntu mate 的支持。楼主试试 ustc,以前倒腾过。ustc 有专门的 ubuntu arm 源,其他构架的也有,tuna 似乎没这么全,更别说 163 了。
    Death
        12
    Death  
       2017-08-09 10:16:22 +08:00 via Android
    你需要用这个源
    http://ports.ubuntu.com
    Death
        13
    Death  
       2017-08-09 10:19:11 +08:00 via Android
    一般其他架构的话用默认的源就好了,速度不理想用代理就是了。
    yangonee
        14
    yangonee  
    OP
       2017-08-09 10:27:13 +08:00
    @Zzzzzzzzz 谢谢,我知道原因了。
    yangonee
        15
    yangonee  
    OP
       2017-08-09 10:58:19 +08:00
    @xratzh 大赞,果然 USTC 有
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2528 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 16:06 · PVG 00:06 · LAX 08:06 · JFK 11:06
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.