最近在配置编译Android源码的环境,在安装所需的软件时遇到
E: Unable to locate package XXX的问题,找了一番,原来是ubuntu的软件源的问题,官方源貌似在我们大天朝很多网址都不能访问,内地的一些源也都不全,最终找到香港中文大学的源问题就解决了!
使用方法:使用sudo gedit /etc/apt/sources.list ,打开源列表文件,先备份下,然后用以下覆盖该文件的内容:
deb http://ftp.cuhk.edu.hk/pub/Linux/ubuntu quantal main restricted universe multiverse
deb http://ftp.cuhk.edu.hk/pub/Linux/ubuntu quantal-security main restricted universe multiverse
deb http://ftp.cuhk.edu.hk/pub/Linux/ubuntu quantal-updates main restricted universe multiverse
deb http://ftp.cuhk.edu.hk/pub/Linux/ubuntu quantal-backports main restricted universe multiverse
deb http://ftp.cuhk.edu.hk/pub/Linux/ubuntu quantal-proposed main restricted universe multiverse
deb-src http://ftp.cuhk.edu.hk/pub/Linux/ubuntu quantal main restricted universe multiverse
deb-src http://ftp.cuhk.edu.hk/pub/Linux/ubuntu quantal-security main restricted universe multiverse
deb-src http://ftp.cuhk.edu.hk/pub/Linux/ubuntu quantal-updates main restricted universe multiverse
deb-src http://ftp.cuhk.edu.hk/pub/Linux/ubuntu quantal-backports main restricted universe multiverse
deb-src http://ftp.cuhk.edu.hk/pub/Linux/ubuntu quantal-proposed main restricted universe
deb http://ftp.cuhk.edu.hk/pub/Linux/ubuntu quantal-security main restricted universe multiverse
deb http://ftp.cuhk.edu.hk/pub/Linux/ubuntu quantal-updates main restricted universe multiverse
deb http://ftp.cuhk.edu.hk/pub/Linux/ubuntu quantal-backports main restricted universe multiverse
deb http://ftp.cuhk.edu.hk/pub/Linux/ubuntu quantal-proposed main restricted universe multiverse
deb-src http://ftp.cuhk.edu.hk/pub/Linux/ubuntu quantal main restricted universe multiverse
deb-src http://ftp.cuhk.edu.hk/pub/Linux/ubuntu quantal-security main restricted universe multiverse
deb-src http://ftp.cuhk.edu.hk/pub/Linux/ubuntu quantal-updates main restricted universe multiverse
deb-src http://ftp.cuhk.edu.hk/pub/Linux/ubuntu quantal-backports main restricted universe multiverse
deb-src http://ftp.cuhk.edu.hk/pub/Linux/ubuntu quantal-proposed main restricted universe
再sudo apt-get update 一下就OK了!