美文网首页Ubuntu
Ubuntu更换包源

Ubuntu更换包源

作者: _昨夜雨疏风骤 | 来源:发表于2018-11-18 12:57 被阅读0次

    问题

    当执行sudo apt-get updatesudo apt-get install时,
    出现Not Found Package Repository Errors
    E: Some index files failed to download They have been ignored, or old ones used的问题,
    可以通过更换包源来解决

    解决方法

    1. 备份
      sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
    2. 修改
      sudo vim /etc/apt/sources.list,用下面内容(16.04.3)替换:
    deb http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
    deb http://cn.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
    deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
    deb http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
    ##测试版源
    deb http://cn.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse
    # 源码
    deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
    deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
    deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
    deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
    ##测试版源
    deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse
    

    更新

    sudo apt-get update

    相关文章

      网友评论

        本文标题:Ubuntu更换包源

        本文链接:https://www.haomeiwen.com/subject/ajfgfqtx.html