美文网首页
linux更换下载源

linux更换下载源

作者: 东安昌 | 来源:发表于2018-11-30 17:26 被阅读0次

    在linux 系统下,有时候使用命令sudo apt-get install 安装命令时,经常会出现找不到软件安装包或者下载出错而导致软件安装失败的情况,这种情况有可能就是因为数据源是国外镜像而导致网址无法访问,这时需要做的是翻墙或者更换国内数据源。更换方法:

    1 sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup #备份

    2 sudo nano /etc/apt/sources.list  #修改,将下面的阿里源复制进来

    3 sudo apt-get update #更新列表

    阿里云源:

    deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse

    deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse

    deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse

    deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse

    deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

    deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse

    deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse

    deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse

    deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse

    deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

    相关文章

      网友评论

          本文标题:linux更换下载源

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