一聚教程网:一个值得你收藏的教程网站

热门教程

ubuntu软件源 sudo apt-get update更新列表

时间:2022-06-30 19:32:31 编辑:袖梨 来源:一聚教程网

 

 代码如下 复制代码

#电子科技大学

deb http://ubuntu.uestc.edu.cn/ubuntu/ quantal main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ quantal-backports main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ quantal-proposed main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ quantal-security main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ quantal-updates main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ quantal main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ quantal-backports main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ quantal-proposed main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ quantal-security main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ quantal-updates main restricted universe multiverse


# sohu 更新服务器:
deb http://mirrors.sohu.com/ubuntu/ karmic main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ karmic-security main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ karmic-updates main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ karmic-proposed main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ karmic-backports main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ karmic main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ karmic-security main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ karmic-updates main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ karmic-proposed main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ karmic-backports main restricted universe multiverse

# 骨头兄亲自搭建并维护这个Ubuntu源(该源位于浙江杭州百兆共享宽带的电信机房):
deb http://ubuntu.srt.cn/ubuntu/ karmic main restricted universe multiverse
deb http://ubuntu.srt.cn/ubuntu/ karmic-security main restricted universe multiverse
deb http://ubuntu.srt.cn/ubuntu/ karmic-updates main restricted universe multiverse
deb http://ubuntu.srt.cn/ubuntu/ karmic-proposed main restricted universe multiverse
deb http://ubuntu.srt.cn/ubuntu/ karmic-backports main restricted universe multiverse
deb-src http://ubuntu.srt.cn/ubuntu/ karmic main restricted universe multiverse
deb-src http://ubuntu.srt.cn/ubuntu/ karmic-security main restricted universe multiverse
deb-src http://ubuntu.srt.cn/ubuntu/ karmic-updates main restricted universe multiverse
deb-src http://ubuntu.srt.cn/ubuntu/ karmic-proposed main restricted universe multiverse
deb-src http://ubuntu.srt.cn/ubuntu/ karmic-backports main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu/ubuntu-cn karmic main restricted universe multiverse

# Archive.ubuntu.com更新服务器(欧洲,此为官方源,电信网通用户使用):
deb http://archive.ubuntu.com/ubuntu/ karmic main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ karmic-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ karmic-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ karmic-proposed main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ karmic-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ karmic main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ karmic-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ karmic-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ karmic-proposed main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ karmic-backports main restricted universe multiverse

# Mirrors.shlug.org更新服务器(电信服务器,Ubuntu China Official Mirror, maintained by Shanghai Linux User Group):
deb http://cn.archive.ubuntu.com/ubuntu karmic main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu karmic-security main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu karmic-updates main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu karmic-backports main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu karmic-proposed main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu karmic main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu karmic-security main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu karmic-updates main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu karmic-backports main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu karmic-proposed main restricted universe multiverse

# Mirror.lupaworld.com更新服务器(浙江省杭州市双线服务器):
deb http://mirror.lupaworld.com/ubuntu karmic main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu karmic-security main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu karmic-updates main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu karmic-backports main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu karmic-proposed main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu karmic main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu karmic-security main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu karmic-updates main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu karmic-backports main restricted universe multiverse
deb-src http://mirror.lupaworld.com/ubuntu karmic-proposed main restricted universe multiverse

 

执行命令更新

sudo apt-get update


使用sudo apt-get update问题总结

sudo apt-get update

显示为

E: 无法获得锁 /var/lib/apt/lists/lock - open (11 Resource temporarily unavailable)
E: 无法对状态列表目录加锁

直接把lock 文件删除就是了..
sudo rm /var/lib/apt/lists/lock


我在网上查了一下,还有下面方法


先查看一下是否有使用apt-get的程序,终端输入:ps -aux,找到使用apt-get的程序(最后一列),查看其PID号,然后杀死其进程,输入sudo kill PID,然后升级一下软件源,sudo apt-get update,sudo apt-get dist-update.         

 

Ubuntu 更新软件源出错问题


当执行sudo apt-get update来更新软件源时,若出现以下类似错误: Failed to fetch http://cn.archive.ubuntu.com/ubuntu/dists/maverick/Release.gpg Something wicked happened resolving 'cn.archive.ubuntu.com:http' (-5 - No address associated with hostname)

说明DNS解析出现了问题,应着重查看以下方面:

1. cat /etc/resolv.conf

查看里面的domain, search和nameserver配置是否正确。

若通过代理上网,请查看:

2. cat /etc/apt/apt.conf

在里面添加设置:

Acquire::http::proxy "http://xxxxx.xxxxx.xxxx:1080" , 注意是http, 不是https

3. 查看 “系统”--> “首选项”--> “网络代理”,里面的代理是否设置正确

热门栏目