ubuntu 更新软件源

修改文件sources.list 位于/etc/apt/sources.list,并备份原文件为sources.list.bak

deb http://mirrors.163.com/ubuntu/ precise main restricted
deb-src http://mirrors.163.com/ubuntu/ precise main restricted
deb http://mirrors.163.com/ubuntu/ precise-updates main restricted
deb-src http://mirrors.163.com/ubuntu/ precise-updates main restricted
deb http://mirrors.163.com/ubuntu/ precise universe
deb-src http://mirrors.163.com/ubuntu/ precise universe
deb http://mirrors.163.com/ubuntu/ precise-updates universe
deb-src http://mirrors.163.com/ubuntu/ precise-updates universe
deb http://mirrors.163.com/ubuntu/ precise multiverse
deb-src http://mirrors.163.com/ubuntu/ precise multiverse
deb http://mirrors.163.com/ubuntu/ precise-updates multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-updates multiverse
deb http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ precise-security main restricted
deb-src http://mirrors.163.com/ubuntu/ precise-security main restricted
deb http://mirrors.163.com/ubuntu/ precise-security universe
deb-src http://mirrors.163.com/ubuntu/ precise-security universe
deb http://mirrors.163.com/ubuntu/ precise-security multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-security multiverse
deb http://extras.ubuntu.com/ubuntu precise main
deb-src http://extras.ubuntu.com/ubuntu precise main
# sohu(非教育网推荐)
deb http://mirrors.sohu.com/ubuntu/ precise main restricted
deb-src http://mirrors.sohu.com/ubuntu/ precise main restricted
deb http://mirrors.sohu.com/ubuntu/ precise-updates main restricted
deb-src http://mirrors.sohu.com/ubuntu/ precise-updates main restricted
deb http://mirrors.sohu.com/ubuntu/ precise universe
deb-src http://mirrors.sohu.com/ubuntu/ precise universe
deb http://mirrors.sohu.com/ubuntu/ precise-updates universe
deb-src http://mirrors.sohu.com/ubuntu/ precise-updates universe
deb http://mirrors.sohu.com/ubuntu/ precise multiverse
deb-src http://mirrors.sohu.com/ubuntu/ precise multiverse
deb http://mirrors.sohu.com/ubuntu/ precise-updates multiverse
deb-src http://mirrors.sohu.com/ubuntu/ precise-updates multiverse
deb http://mirrors.sohu.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ precise-backports main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ precise-security main restricted
deb-src http://mirrors.sohu.com/ubuntu/ precise-security main restricted
deb http://mirrors.sohu.com/ubuntu/ precise-security universe
deb-src http://mirrors.sohu.com/ubuntu/ precise-security universe
deb http://mirrors.sohu.com/ubuntu/ precise-security multiverse
deb-src http://mirrors.sohu.com/ubuntu/ precise-security multiverse
deb http://extras.ubuntu.com/ubuntu precise main
deb-src http://extras.ubuntu.com/ubuntu precise main

更新

sudo apt-get update
sudo apt-get upgrade

这里是打算安装32位兼容库

apt-get install ia32-libs

这个服务器的DNS竟然没有

sudo vi /etc/resolvconf/resolv.conf.d/base(这个文件默认是空的)

nameserver 8.8.8.8
nameserver 8.8.4.4

保存,然后执行

sudo resolvconf -u

再看/etc/resolv.conf,最下面就多了2行:

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 8.8.8.8
nameserver 8.8.4.4

可以看到我们的设置已经加上了,然后再ping一个域名,当时就可以解析了,无需重启。

ubuntu 更新软件源的更多相关文章

  1. ubuntu更新软件源

    更新源方法: 1. 打开终端.单击主菜单中的“应用程序 - 附件 - 终端”. 2. 修改更新服务器列表.请在终端中执行下面的两条命令: sudo cp /etc/apt/sources.list / ...

  2. Linux学习笔记——Ubuntu更新软件源

    0.前言     通过改动ubuntu软件源可提高apt命令下载安装软件的速度.     參考资料     [官方资料]--配置文件改动方法     [Ubuntu如何改动软件源地址]--使用ubun ...

  3. Ubuntu更新软件源出现GPG error

    原因 在sources.list文件中加入了非ubuntu官方源,所以认为加入源是不可信任的. 解决方法导入该源公钥.E084DAB9为PUBKEY后八位 gpg --keyserver keyser ...

  4. ubuntu安装软件失败,出现404错误,更新软件源

    更新源方法 备份原来的源 首先备份原来的源,用来出错后进行恢复 sudo cp /etc/apt/sources.list/etc/apt/sources.list_backup 1 如果更新源后出错 ...

  5. [ubuntu]deb软件源

    虽然ubuntu的中国服务器的速度已经非常不错,但是难免,会有网络不畅的情形,所以修改软件源地址是一个基础的知识点. 修改ubuntu的软件源的方式有多种,一直是通过ubuntu软件中心提供的UI,还 ...

  6. linux -- ubuntu 何为软件源

    新手学Ubuntu的时候,一般不知道什么是源,但源又是Ubuntu下常用到的东西.因此,本文就详细介绍一下Ubuntu 源. 什么是软件源? 源,在Ubuntu下,它相当于软件库,需要什么软件,只要记 ...

  7. ubuntu更换软件源

     ubuntu更换软件源 /etc/apt/source.list 163: deb http://mirrors.163.com/ubuntu/ trusty main restricted u ...

  8. kali linux 更新软件源,安装中文输入法,修复Linux与windows引导菜单解决windows引导丢失

    1. 更新软件源打开sources.list文件,进行添加更新源:leafpad /etc/apt/sources.list 2. 添加软件源#官方源 deb http://http.kali.org ...

  9. Debian更新软件源提示There is no public key available for the following key IDs的解决方法

    今天装了的debian7.0 但是更新软件源的时候出错 提示 W: There is no public key available for the following key IDs: 9D6D8F ...

随机推荐

  1. (转)HTML5实战与剖析之触摸事件(touchstart、touchmove和touchend)

    HTML5中新添加了很多事件,但是由于他们的兼容问题不是很理想,应用实战性不是太强,所以在这里基本省略,咱们只分享应用广泛兼容不错的事件,日后随着兼容情况提升以后再陆续添加分享.今天为大家介绍的事件主 ...

  2. ssm框架查询数据并实现分页功能示例

    /** * DataGrid对象 * */ @SuppressWarnings("rawtypes") public class DataGrid { private int to ...

  3. 从零开始学android开发-View的setOnClickListener的添加方法

    1)第一种,也是最长见的添加方法(一下都以Button为例) Button btn = (Button) findViewById(R.id.myButton); btn .setOnClickLis ...

  4. linux下tomcat开机自启动

    tomcat自启动配置: 方法一: vi /etc/rc.local 添加如下一行 /opt/apache-tomcat-7.0.29/bin/startup.sh (脚本绝对路径) 注意:要添加在e ...

  5. Elasticsearch是一个分布式可扩展的实时搜索和分析引擎,elasticsearch安装配置及中文分词

    http://fuxiaopang.gitbooks.io/learnelasticsearch/content/  (中文) 在Elasticsearch中,文档术语一种类型(type),各种各样的 ...

  6. [AngularJS] Directive using another directive by 'require'

    Directive can use another directive though 'require' keyword. angular.module('docsTabsExample', []) ...

  7. yii泛域名

    return CMap::mergeArray( require (dirname(__FILE__) . '/main.php'), array( 'components' => array( ...

  8. php上传常见文件类型对应的$_FILES["file"]["type"](转)

    php上传常见文件类型对应的$_FILES["file"]["type"] from:http://hi.baidu.com/7book/item/374971 ...

  9. Asp.net关闭弹出窗口刷新父窗口

    通常情况下,关闭窗口时不需要对父窗口做任何操作,但如果子窗口是某一对象的修改画面,这时,当关闭子窗体时就需要对父窗口刷新,刷新可以通过三种方式来实现:1,采用window.opener.locatio ...

  10. js自动提交按钮

    document.forms['alipaysubmit'].submit(); <form id='alipaysubmit' name='alipaysubmit' action='' me ...