一台安装有Debian系统的计算机
首先需要说明的是,Debian源的配置文件位置:/etc/apt/sources.list使用文本编辑器打开此文件,就能查看源的配置信息。
接下来,分享一下国内外的源。主要当然还是国内的喽:--------------------------------------------------------一、国内源: 163deb http://mirrors.163.com/debian/ squeeze main non-free contribdeb http://mirrors.163.com/debian/ squeeze-proposed-updates main contrib non-freedeb http://mirrors.163.com/debian-security/ squeeze/updates main contrib non-freedeb-src http://mirrors.163.com/debian/ squeeze main non-free contribdeb-src http://mirrors.163.com/debian/ squeeze-proposed-updates main contrib non-freedeb-src http://mirrors.163.com/debian-security/ squeeze/updates main contrib non-free 教育deb http://ftp.sjtu.edu.cn/debian/ squeeze main non-free contribdeb http://ftp.sjtu.edu.cn/debian/ squeeze-proposed-updates main contrib non-freedeb http://ftp.sjtu.edu.cn/debian-security/ squeeze/updates main contrib non-free 科技大学deb http://ftp.cn.debian.org/debian squeeze main contrib non-freedeb-src http://ftp.cn.debian.org/debian squeeze main contrib non-free 台湾主站deb http://ftp.tw.debian.org/debian squeeze main contrib non-freedeb-src http://ftp.tw.debian.org/debian squeeze main contrib non-free 香港deb http://ftp.hk.debian.org/debian squeeze main contrib non-freedeb-src http://ftp.hk.debian.org/debian squeeze main contrib non-free 搜狐镜像deb http://mirrors.sohu.com/debian squeeze main contrib non-freedeb-src http://mirrors.sohu.com/debian squeeze main contrib non-free 北京理工大学deb http://mirror.bitunion.org/debian/ stable main contrib non-freedeb-src http://mirror.bitunion.org/debian/ stable main contrib non-free二、官方源deb http://ftp.debian.org/debian/ squeeze main contrib non-freedeb-src http://ftp.debian.org/debian/ squeeze main contrib non-freedeb http://security.debian.org/ squeeze/updates maindeb-src http://security.debian.org/ squeeze/updates maindeb http://mirrors.kernel.org/debian/ squeeze main contrib non-freedeb-src http://mirrors.kernel.org/debian/ squeeze main contrib non-free三、dotdeb源 官方deb http://packages.dotdeb.org stable alldeb-src http://packages.dotdeb.org stable alldeb http://php53.dotdeb.org stable alldeb-src http://php53.dotdeb.org stable all dotdeb japan 源deb http://download.softagency.net/debian/dotdeb/ stable alldeb-src http://download.softagency.net/debian/dotdeb/ stable all------------------------------------------------------------------
在此说明配置源的方法:很简单,把源地址写进 /etc/apt/sources.list 就可以了。可以用 # 注释。推荐163,搜狐等源。
sources.list 写好后,需要更新一下。使用如下命令:apt-get update如果提醒你需要导入密钥,则:gpg --keyserver
经过以上步骤,源已经更新完毕,可以试着使用新源更新一下软件库喽:apt-get upgrade
如果更新源列表时,有一系列错误提示出现,可能就是源的地址不对了。可以按着错误提示修改一下源列表文件。