Ubunutu安装时,默认没有给apt-get配置国内镜像源,其默认配置的镜像源国内不能访问到,安装软件处处失败,所以我们需要配置国内镜像源:

首先避免出错,我们先备份原sources.list文件,这是一个好习惯。避免出错

cp /etc/apt/sources.list /etc/sources.list.bak

删除sources.list中的原内容,ubuntu16.04添加如下内容,可以使用阿里云的镜像源:

deb http://mirrors.aliyun.com/ubuntu/ xenial main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates universe deb http://mirrors.aliyun.com/ubuntu/ xenial-security main
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security universe

最后使用命令更新源信息:

sudo apt-get update

最新文章

  1. vim没有颜色
  2. c++编译错误提示及解决
  3. paip.注册java程序为LINUX系统服务的总结。
  4. Testlink中分析结果的图表显示乱码
  5. Android7.0 Phone应用源码分析(一) phone拨号流程分析
  6. net core 实战之 redis 负载均衡和"高可用"实现
  7. js 函数闭包内部返回函数体调用方法难点解答
  8. Signs of a poorly written jQuery plugin 翻译 (Jquery插件开发注意事项,Jquey官方推荐)
  9. vs2012如何创建报表
  10. React中的Statics对象
  11. Maven插件实现的autoconfig机制(转)
  12. 从string.size()和string.length()聊到长度的问题和一个关于数据结构定义的技巧
  13. IOS--UIButton的使用方法
  14. hdoj 1175 (bfs)
  15. redis五种数据类型
  16. MS SQL xp_instance_regwrite设置注册表疑惑
  17. mybatis 在xml文件中获取当前时间的sql
  18. Python爬虫入门教程 36-100 酷安网全站应用爬虫 scrapy
  19. C#中Skip和Take的用法
  20. 文件传输协议(FTP)

热门文章

  1. Python 自动化中三种等待时间的详解
  2. redis 0: "AUTH <password> called without any password configured for the def
  3. 在Github上搭建个人主页
  4. 基于Geojson的点集的抽稀Js实现
  5. [洛谷/题目] P1562 还是N皇后
  6. 1. ansible学习总结: 基础模块
  7. 【ML】序
  8. net Core做一个webApi的简单实例
  9. random随机数模块
  10. tkinter的after函数的使用方法