今天安装了ubuntu server12.04,但是系统默认的源比较慢,所以更改了一下源地址。方法如下:
- 首先是备份之前源配置文件
cp /etc/apt/sources.list /etc/apt/sources.list.bak - 修改源配置文件,需要有root权限的用户
sudo vim /etc/apt/sources.list - 我选择了搜狐源,还算是比较快的了,在打开的文件的末尾加入一下其中一个源:
搜狐源:
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.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 - 更新
sudo apt-get update
sudo apt-get upgrade - 这样就配置好了
在执行sudo apt-get update的时候,可能会出现一下问题:
W: GPG error: http://extras.ubuntu.com quantal Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 16126D3A3E5C1192
解决办法:
gpg --keyserver hkp://subkeys.pgp.net --recv-keys 16126D3A3E5C1192
gpg --export --armor 16126D3A3E5C1192 | sudo apt-key add -
再试着去更新
apt-get update && apt-get dist-upgrade
在处理一件事情的时候,遇到问题并不可怕,关键是怎么解决问题,不管怎样,能解决问题,也算是一种收获
参考资料:http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_in_Ubuntu