Ubuntu 12.04、12.10、14.04更新国内源(测试有效20220114)

原文地址:https://blog.csdn.net/yuanlu837/article/details/118944561

ubuntu 12.04、12.10、ubuntu14.04 测试有效的阿里云源
第一步、首先备份ubuntu12.04源文件

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak(备份当前源文件)
1
2、修改并更新源文件

sudo vim /etc/apt/sources.list
1
3、把下面的信息复制到上述文件中ubuntu-12.04、 ubuntu-12.10

deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

ubuntu-14.04测试有效

deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

4、更新源

sudo apt-get update
1
5、可以自定义安装需要的软件了

sudo apt-get install httpd xxxx 等等

正在读取软件包列表… 完成
正在分析软件包的依赖关系树
正在读取状态信息… 完成
将会安装下列额外的软件包:
xinetd
下列【新】软件包将被安装:
tftpd xinetd
升级了 0 个软件包,新安装了 2 个软件包,要卸载 0 个软件包,有 1231 个软件包未被升级。
需要下载 120 kB 的软件包。
解压缩后会消耗掉 410 kB 的额外空间。
您希望继续执行吗?[Y/n]y
获取:1 http://mirrors.aliyun.com/ubuntu/ trusty/main xinetd amd64 1:2.3.15-3ubuntu1 [104 kB]
获取:2 http://mirrors.aliyun.com/ubuntu/ trusty/universe tftpd amd64 0.17-18ubuntu2 [15.4 kB]
下载 120 kB,耗时 0秒 (626 kB/s)
Selecting previously unselected package xinetd.
(正在读取数据库 … 系统当前共安装有 147023 个文件和目录。)
正在解压缩 xinetd (从 …/xinetd_1%3a2.3.15-3ubuntu1_amd64.deb) …
Selecting previously unselected package tftpd.
正在解压缩 tftpd (从 …/tftpd_0.17-18ubuntu2_amd64.deb) …
正在处理用于 man-db 的触发器…
正在处理用于 doc-base 的触发器…
Processing 29 changed doc-base files, 1 added doc-base file…
正在处理用于 ureadahead 的触发器…
正在设置 xinetd (1:2.3.15-3ubuntu1) …