安装了Ubuntu13.10,但不能在联网状态下安装相关软件
所谓镜像源,就是ubuntu已联网情况下,希望能自动寻找相关软件安装,比如执行sudo apt-get install lua5.1(自动安装lua)。
因为安装程序是从你所选取的镜像源服务器下载,下载的速度和你选取的镜像源相关。
默认的镜像源速度都比较慢,推荐教育网下去中科大的镜像源:http://mirrors.ustc.edu.cn/,电信网去网易镜像源:http://mirrors.163.com/。
找到etc/apt/目录下的sources.list文件,因为这个文件默认不是管理员是不能修改的,先要更改文件权限,在终端输入sudo chmod 777 /etc/apt/sources.list
然后用gedit文本编辑器打开编辑:
以lucid(12.04)为例, 编辑/etc/apt/sources.list文件, 把文件替换为以下条目(操作前请做好相应备份)
deb http://mirrors.163.com/ubuntu/ lucid main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ lucid-security main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ lucid-updates main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ lucid-proposed main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ lucid-backports main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ lucid main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ lucid-security main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ lucid-updates main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ lucid-proposed main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ lucid-backports main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu/ lucid main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu/ lucid-security main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu/ lucid-updates main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu/ lucid-proposed main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse deb-src http://archive.ubuntu.com/ubuntu/ lucid main restricted universe multiverse deb-src http://archive.ubuntu.com/ubuntu/ lucid-security main restricted universe multiverse deb-src http://archive.ubuntu.com/ubuntu/ lucid-updates main restricted universe multiverse deb-src http://archive.ubuntu.com/ubuntu/ lucid-proposed main restricted universe multiverse deb-src http://archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse
然后保存,如果不能保存,在gedit编辑器的edit->prefrences的editor下,将文件修改前备份去掉(Create a backup copy of files before saving),这样就可以保存。
更改完之后,要更新镜像源,在终端输入 sudo apt-get update,更新完后,应该就可以正常安装软件了。