在Ubuntu中,通过apt-get可以很便捷地安装软件,但有时会碰到所要安装的软件是源中没有,这时可以到Ubuntu的官网上寻找对应的源(http://wiki.ubuntu.org.cn/%E6%BA%90%E5%88%97%E8%A1%A8),在该网站上,叙述了如何更新源,即:
一、先将sources.list备份,
sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
二、然后参考指定格式添加对应的源
deb http://cn.archive.ubuntu.com/ubuntu/ willy main restricted universe multiverse deb http://cn.archive.ubuntu.com/ubuntu/ willy-security main restricted universe multiverse deb http://cn.archive.ubuntu.com/ubuntu/ willy-updates main restricted universe multiverse deb http://cn.archive.ubuntu.com/ubuntu/ willy-backports main restricted universe multiverse ##測試版源 deb http://cn.archive.ubuntu.com/ubuntu/ willy-proposed main restricted universe multiverse # 源碼 deb-src http://cn.archive.ubuntu.com/ubuntu/ willy main restricted universe multiverse deb-src http://cn.archive.ubuntu.com/ubuntu/ willy-security main restricted universe multiverse deb-src http://cn.archive.ubuntu.com/ubuntu/ willy-updates main restricted universe multiverse deb-src http://cn.archive.ubuntu.com/ubuntu/ willy-backports main restricted universe multiverse ##測試版源 deb-src http://cn.archive.ubuntu.com/ubuntu/ willy-proposed main restricted universe multiverse
三、最后更新源使其生效
sudo apt-get update
当然,有时也会碰到更新源了也还是没有资源,那么便可以去下述网站找对应资源:
https://altlinux.pkgs.org/