zoukankan      html  css  js  c++  java
  • ubuntu apt-get update 失败解决

    当运行apt-get update后出现如下错误时:

    E: Some index files failed to download, they have been ignored...........

    可能是ubuntu16.04自带的源不好,我们只需要在换一个源即可。

    ubuntu 16.04 LTS 修改 国内源(以中科大源为例)

     

    国内有很多ubuntu的源,包括:网易源(这个之前用过,速度很快的),阿里源,还有很多教育网的源,如:清华源,中科大源。

    执行命令:sudo gedit /etc/apt/sources.list 

    这里要下载的是中科大ubuntu16.04的源列表,可以在这里获得:https://lug.ustc.edu.cn/repogen/

     编辑/etc/apt/sources.list文件, 在文件最前面添加以下条目(操作前请做好相应备份):

    deb http://mirrors.ustc.edu.cn/ubuntu/ xenial main restricted universe multiverse
    deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
    deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
    deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
    deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
    deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial main restricted universe multiverse
    deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
    deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
    deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
    deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse

    之后输入:

    sudo apt-get update

    更新源。

  • 相关阅读:
    div minheight
    tomcat启动时doc窗口一闪而过的解决方法
    积分题05012014
    LaTeX技巧001:LaTeX中输入大小写罗马数字
    积分题1之来自G.Han的一道积分题
    LaTeX测试
    header函式的使用
    PHP中如何调用webservice
    在C++Builder中开发CGI的一点点体会
    PHP教程.经验技巧(中)
  • 原文地址:https://www.cnblogs.com/creazylinux/p/8134949.html
Copyright © 2011-2022 走看看