Ubuntu安装软件有很多问题是因为源的问题,比如Ubuntu14.04安装openjdk-7-jdk可能会出现依赖问题,我曾查找了很多办法都没解决,但是换了阿里云的软件源后问题就解决了。
阿里云的源很快,下面总结一下如何更换Ubuntu的软件源。
一、备份
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
二、修改
sudo gedit /etc/apt/sources.list
在source.list文件添加一下内容
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