1、编辑文件
vim /etc/apt/sources.list.d/sources-aliyun-0.list
在文件最后添加以下内容
deb http://mirrors.aliyun.com/ubuntu/ vivid main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ vivid-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ vivid-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ vivid-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ vivid-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ vivid main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ vivid-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ vivid-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ vivid-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ vivid-backports main restricted universe multiverse
2、更新
apt-get update
apt-get upgrade
这里分享一个有趣的故事,一个促使我换源的....有趣的....故事。
. 首先,我之前都是用Centos,在阿里云买了一台服务器,是Ubuntu的系统;
. 然后,系统自带了安装2.7 和 3.5 ,默认版本是2.7
到这里,是背景,故事开始了.....
1、想装个ipython,但是安装报错
说python版本太低(2.7),ipython不支持2.7等等版本...
2、然后我就装3.5,发现机器上有3.5,修改默认python版本就好
Linux python2.7 升级到3.5
3、改完安装还是报错
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
from pip import main
ImportError: No module named 'pip'
然后场面一度十分尴尬,
python2.7安装说版本太低
换成python3.5安装说没有pip模块
4、于是我换成apt-get安装..
第一次用Ubuntu...
root@JoJo:~# apt-get install ipython3
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package ipython
左装右装,死活说没包....场面一度又十分尴尬....
陷入pip与apt-get的循环....求解Ubuntu是不是用apt-get比较好...
各种说没有包,于是我就在想,怕不是源的包太少,换了源果然安装上了。
于是换了源....终于好了....感动死了
apt-get install ipython3
网友评论