apt-get 找不到软件
今日安装 ubuntu。 想通过 apt-get 获得 g++ 和 vim 等常用软件, 但是发现 apt-get 后很快就得到了没有软件的回答, 因此怀疑是源没有设置正确。 我从没接触过源的设置, 今日下决心自己弄一回。 于是网上看了看, 基本是通过修改 /etc/apt/source.list 来修改源的服务器来获得软件的列表。 尝试了几个都没有成功, 直到:
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ natty main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ natty-security main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ natty-updates main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ natty-backports main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ natty-proposed main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ natty main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ natty-security main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ natty-updates main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ natty-backports main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ natty-proposed main restricted universe multiverse
deb http://mirror.bjtu.edu.cn/ubuntu/ karmic main multiverse restricted universe
deb http://mirror.bjtu.edu.cn/ubuntu/ karmic-backports main multiverse restricted universe
deb http://mirror.bjtu.edu.cn/ubuntu/ karmic-proposed main multiverse restricted universe
deb http://mirror.bjtu.edu.cn/ubuntu/ karmic-security main multiverse restricted universe
deb http://mirror.bjtu.edu.cn/ubuntu/ karmic-updates main multiverse restricted universe
deb-src http://mirror.bjtu.edu.cn/ubuntu/ karmic main multiverse restricted universe
deb-src http://mirror.bjtu.edu.cn/ubuntu/ karmic-backports main multiverse restricted universe
deb-src http://mirror.bjtu.edu.cn/ubuntu/ karmic-proposed main multiverse restricted universe
deb-src http://mirror.bjtu.edu.cn/ubuntu/ karmic-security main multiverse restricted universe
deb-src http://mirror.bjtu.edu.cn/ubuntu/ karmic-updates main multiverse restricted universe
在修改完源列表后, 切记要 sudo apt-get update 一下, 否则修改后的源是不生效的。