一个上午基本上都在折腾这个了,坑爹啊
继上次 Linux 里面配多个 Python 出现 easy_install 出错的问题之后,问了江阁,他给了两个方法,一个用系统的包管理升级到 python 2.7 ,另外一个就是自己一切手动来。
上午试了一下自己配一点,发现没到那个水平,配的时候总是会出现各种错,而且错的比较灵异,想来是对 Linux 的细节还不够把握,于是试着升级的方法
教程看的是这里的教程,http://www.coder4.com/archives…,看起来步骤简单明了,但是在
sudo apt-get update
的时候出现了问题,首先遇到:
Dynamic MMap ran out of room. Please increase the size of APT::Cache-Limit
于是跟着网上的方法,http://languor.us/e-dynamic-mm…
To fix this, navigate to /etc/apt/apt.conf.d and edit the file related to debconf which in my case was 70debconf. Add the following line to the bottom of this file and save it:
APT::Cache-Limit “200000000”;
然后往后走,报错:
命中 http://security.debian.org stable/updates/main Packages 下载 23.5kB,耗时 25s (912B/s) 正在读取软件包列表... 有错误! E: 糟了,软件包说明的数量了超出本程序的处理能力。 E: Problem with MergeList /var/lib/dpkg/status E: 无法解析或打开软件包的列表或是状态文件。
于是 google 一阵搜,看到网上很多人的方法是,http://forum.ubuntu.org.cn/vie…
* 在终端中运行 gksu gedit /etc/apt/sources.list
* 编辑sources.list文件,屏蔽rchive.ubuntu.com更新服务器(欧洲,此为官方源,电信、网通用户使用)将其下的源前加“#”,保存、退出
* 重新启动更新源管理服务器,搜索升级包。
但是我根本就没有添加过这个源,又看到http://ihaveapc.com/2011/05/ho…
From the Terminal type the following commands :
sudo rm /var/lib/apt/lists/* -vf
andsudo apt-get update
但是还是没用,注意到报错前,去 163 的镜像读取过文件,但是我的 /etc/apt/source.list 里面是没有的,纠结了许久,发现在 /etc/apt/ 下有一个 source.list.d 文件夹,进去有一个 apt-spy.list 文件,里面写着 163 的源,想起来之前装过一个类似的软件,http://blog.netroby.com/articl…,是用来寻找速度快的源的,坑爹啊,这里还影响 apt-get update 的行为,把这里注释掉,终于可以顺利的 update 了。