ubuntu9.10使用apt-get时找不到下载源问题

来源:互联网 发布:udp端口号范围 编辑:程序博客网 时间:2024/05/16 18:03

ubuntu9.10使用apt-get时找不到下载源问题


(1)修改Ubuntu更新源sources.list,提高软件下载安装速度  

sources.list在/etc/apt目录下

Ubuntu怎么安装这里就不多说了,这里主要说一下怎么提高Ubuntu下的软件下载安装速度。Ubuntu安装完成后使用apt-get install安装软件时经常会发现下载速度很慢,小的软件还好,大一点的软件要等大半天,急死人啊!!原因是Ubuntu默认更新源是国外的网站,其实国内也有很多Ubuntu的开源镜像站(如网易163镜像站、LUPA镜像站、CN99镜像站等)速度都灰常不错,只需要更新一下源就好啦,方法:

编辑/etc/apt/sources.list文件,把里面的默认的都用#号注释掉(或全删掉)然后添加以下几行:

##163
deb http://mirrors.163.com/ubuntu/ maverick main restricted universe multiverse
deb
 http://mirrors.163.com/ubuntu/ maverick-security main restricted universe multiverse
deb
 http://mirrors.163.com/ubuntu/ maverick-updates main restricted universe multiverse
deb
 http://mirrors.163.com/ubuntu/ maverick-proposed main restricted universe multiverse
deb
 http://mirrors.163.com/ubuntu/ maverick-backports main restricted universe multiverse
deb-src
 http://mirrors.163.com/ubuntu/ maverick main restricted universe multiverse
deb-src
 http://mirrors.163.com/ubuntu/ maverick-security main restricted universe multiverse
deb-src
 http://mirrors.163.com/ubuntu/ maverick-updates main restricted universe multiverse
deb-src
 http://mirrors.163.com/ubuntu/ maverick-proposed main restricted universe multiverse
deb-src
 http://mirrors.163.com/ubuntu/ maverick-backports main restricted universe multiverse

注意了啊,红色标注的是用户名,可以在http://mirrors.163.com/ubuntu/dists/上直接看到,要是这里的不能用了就去上面找一组能用的,是一组,要全部改撒。。如下图所示:
ubuntu9.10使用apt-get时找不到下载源问题

(替换/etc/apt/sources.list)后使用apt-get update更新一下源
问题:root@zdd-desktop:/etc/apt# 01.gpg --keyserver pgpkeys.mit.edu --recv-key 3B4FE6ACC0B21F32
在手动添加外部源,或者更改相关的source之后,升级系统的时候。

如:

[c-sharp] view plaincopyprint?
  1. sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup  
  2. sudo emacs /etc/qpt/sources.list  
 

执行

[c-sharp] view plaincopyprint?
  1. sudo apt-get update  
  2. sudo apt-get upgrade  
 

 

可能会出现:
W: GPG error: ftp://ftp.debian.org/ testing Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 010908312D230C5F W: There is no public key available for the following key IDs: 010908312D230C5F
关键点在,文件指纹不可被验证,因为没有获得相应的PUBKEY。
此时执行:
[c-sharp] view plaincopyprint?
  1. gpg --keyserver pgpkeys.mit.edu --recv-key  010908312D230C5F   
  2. gpg -a --export 010908312D230C5F sudo apt-key add  
注意其中Key ID需要被你所需要的那个替换。 问题:The following packages have unmet dependencies:  libasound2: Breaks: bluez-alsa (<= 4.94-2) but 4.51-0ubuntu2 is to be installed由于ubuntu/debian软件库中有时候不同的库更新速度不一致,apt-get 出出现如下的错误提示 Some packages could not be installed. This may mean that you haverequested an impossible situation or if you are using the unstabledistribution that some required packages have not yet been createdor been moved out of Incoming.The following information may help to resolve the situation: The following packages have unmet dependencies:  libssl-dev: Depends: libssl0.9.8 (= 0.9.8k-7ubuntu8) but 0.9.8k-7ubuntu8.5 is to be installed
这个时候应该请令一个工具出马了:"aptitude"
使用这个工具,当某个库依赖的库与当前版本不一致时,aptitude 会尝试降级当前这个库的版本,同时解决降级这个库对其它软件的依赖性的影响, 最终成功安装apt-get 没法安装的软件如:#aptitude install vim-gnome
http://blog.sina.com.cn/s/blog_c2f250bd0101gykd.html

 

参考:

http://liuzhigong.blog.163.com/blog/static/17827237520121113103236820/

http://blog.csdn.net/chao78787/article/details/6287606

http://tonychiu.blog.51cto.com/656605/654776

0 0