<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Apt on ZRJ | 学习笔记</title>
        <link>https://blog.zrj.me/tags/apt/</link>
        <description>Recent content in Apt on ZRJ | 学习笔记</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>zh-CN</language>
        <lastBuildDate>Mon, 06 Aug 2012 11:08:53 +0800</lastBuildDate><atom:link href="https://blog.zrj.me/tags/apt/index.xml" rel="self" type="application/rss+xml" /><item>
        <title>apt update 时软件包说明的数量了超出本程序的处理能力</title>
        <link>https://blog.zrj.me/posts/2012-08-06-apt-update-%E6%97%B6%E8%BD%AF%E4%BB%B6%E5%8C%85%E8%AF%B4%E6%98%8E%E7%9A%84%E6%95%B0%E9%87%8F%E4%BA%86%E8%B6%85%E5%87%BA%E6%9C%AC%E7%A8%8B%E5%BA%8F%E7%9A%84%E5%A4%84%E7%90%86%E8%83%BD%E5%8A%9B/</link>
        <pubDate>Mon, 06 Aug 2012 11:08:53 +0800</pubDate>
        
        <guid>https://blog.zrj.me/posts/2012-08-06-apt-update-%E6%97%B6%E8%BD%AF%E4%BB%B6%E5%8C%85%E8%AF%B4%E6%98%8E%E7%9A%84%E6%95%B0%E9%87%8F%E4%BA%86%E8%B6%85%E5%87%BA%E6%9C%AC%E7%A8%8B%E5%BA%8F%E7%9A%84%E5%A4%84%E7%90%86%E8%83%BD%E5%8A%9B/</guid>
        <description>&lt;p&gt;一个上午基本上都在折腾这个了，坑爹啊&lt;/p&gt;
&lt;p&gt;继上次 Linux 里面配多个 Python 出现 easy_install 出错的问题之后，问了江阁，他给了两个方法，一个用系统的包管理升级到 python 2.7 ，另外一个就是自己一切手动来。&lt;/p&gt;
&lt;p&gt;上午试了一下自己配一点，发现没到那个水平，配的时候总是会出现各种错，而且错的比较灵异，想来是对 Linux 的细节还不够把握，于是试着升级的方法&lt;/p&gt;
&lt;p&gt;教程看的是这里的教程，&lt;a class=&#34;link&#34; href=&#34;http://www.coder4.com/archives/1551&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;http://www.coder4.com/archives/1551&lt;/a&gt;，看起来步骤简单明了，但是在&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;sudo apt-get update
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;的时候出现了问题，首先遇到：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Dynamic MMap ran out of room. Please increase the size of APT::Cache-Limit
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;于是跟着网上的方法，&lt;a class=&#34;link&#34; href=&#34;http://languor.us/e-dynamic-mmap-ran-out-room-please-increase-size-apt-cache-limit&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;http://languor.us/e-dynamic-mmap-ran-out-room-please-increase-size-apt-cache-limit&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;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 &amp;ldquo;200000000&amp;rdquo;;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;然后往后走，报错：&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;命中 http://security.debian.org stable/updates/main Packages
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;下载 23.5kB，耗时 25s &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;912B/s&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;正在读取软件包列表... 有错误!
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;E: 糟了，软件包说明的数量了超出本程序的处理能力。
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;E: Problem with MergeList /var/lib/dpkg/status
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;E: 无法解析或打开软件包的列表或是状态文件。
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;于是 google 一阵搜，看到网上很多人的方法是，&lt;a class=&#34;link&#34; href=&#34;http://forum.ubuntu.org.cn/viewtopic.php?f=50&amp;amp;t=151642&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;http://forum.ubuntu.org.cn/viewtopic.php?f=50&amp;amp;t=151642&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;* 在终端中运行 gksu gedit /etc/apt/sources.list * 编辑sources.list文件，屏蔽rchive.ubuntu.com更新服务器（欧洲，此为官方源，电信、网通用户使用）将其下的源前加“#”，保存、退出 * 重新启动更新源管理服务器，搜索升级包。&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;但是我根本就没有添加过这个源，又看到&lt;a class=&#34;link&#34; href=&#34;http://ihaveapc.com/2011/05/how-to-fix-problem-with-mergelist-varlibaptlists-error-in-ubuntu-11-04/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;http://ihaveapc.com/2011/05/how-to-fix-problem-with-mergelist-varlibaptlists-error-in-ubuntu-11-04/&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;From the Terminal type the following commands :&lt;/p&gt;
&lt;p&gt;sudo rm /var/lib/apt/lists/* -vf and&lt;/p&gt;
&lt;p&gt;sudo apt-get update&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;但是还是没用，注意到报错前，去 163 的镜像读取过文件，但是我的 /etc/apt/source.list 里面是没有的，纠结了许久，发现在 /etc/apt/ 下有一个 source.list.d 文件夹，进去有一个 apt-spy.list 文件，里面写着 163 的源，想起来之前装过一个类似的软件，&lt;a class=&#34;link&#34; href=&#34;http://blog.netroby.com/article-4199.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;http://blog.netroby.com/article-4199.html&lt;/a&gt;，是用来寻找速度快的源的，坑爹啊，这里还影响 apt-get update 的行为，把这里注释掉，终于可以顺利的 update 了。&lt;/p&gt;
</description>
        </item>
        
    </channel>
</rss>
