zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    Thread中带参方法无法使用之解决方案
    项目相关的风险要素及分类
    AspNetPager分页示例之DataGrid(PostBack分页)
    Substitution 类 (asp.net 2.0 )
    自定义HTTP处理程序显示图片(asp.net 2.0)
    常见文件扩展名和它们的说明
    基于.NET的开源GIS项目(转)
    项目开发流程标准
    AOP(Aspect Oriented Programming) 面向方面编程
    项目实施及管理标准
  • 原文地址:https://www.cnblogs.com/jiangjh/p/9278113.html
Copyright © 2011-2022 走看看