• ubuntu系统,关于源(source)的配置


    1. 现象:(出现的错误)

    执行 sudo apt-get update, 报错:apt-get 404 Not Found Package Repository Errors

    执行 sudo apt-get install, 报错:Some index files failed to download They have been ignored, or old ones used

    2. 解决方法:

    (1)sudo cp  /etc/apt/sources.list    /etc/apt/sources.list_backup

    (2)sudo gedit /etc/apt/sources.list

    将下面的模板内容,复制粘贴到 /etc/apt/sources.list 文件里面后,保存就可以了:(我们使用的Ubuntu 是16.04)

    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

    现在就没有“apt-get 404 Not Found Package Repository Errors” 问题了。

    参考文献:https://blog.csdn.net/github_35160620/article/details/52115542

  • 相关阅读:
    javascript计算两个时间差
    angular 倒计时15 minute的方法封装
    一个页面多个倒计时的封装
    网站倒计时
    angularjs定时任务的设置与清除
    浏览器Event Loop 是个什么鬼
    一个图片测试的小网站:dummyimage.com
    在vscode 一行的末尾按下tab键 快速生成代码 很爽
    VSCODE 快捷键
    weex 在iOS 平台上的整合
  • 原文地址:https://www.cnblogs.com/jiangjh/p/9278113.html
Copyright © 2020-2023  润新知