Ubuntu 更换阿里云软件源

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
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

三、更新

sudo apt-get update
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_33472557/article/details/77389192
文章标签:  ubuntu 阿里云
个人分类:  linux学习笔记
 
 

版权声明:本文为sikong00原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。