<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Fwolf's Blog &#187; libc - Fwolf's Blog</title>
	<atom:link href="http://www.fwolf.com/blog/post/tag/libc/feed" rel="self" type="application/rss+xml" />
	<link>http://www.fwolf.com/blog</link>
	<description>随心·随意·随缘·努力～</description>
	<lastBuildDate>Tue, 29 Dec 2009 14:58:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>升级到8.10 intrepid过程中libc6依赖性死循环问题的解决</title>
		<link>http://www.fwolf.com/blog/post/426</link>
		<comments>http://www.fwolf.com/blog/post/426#comments</comments>
		<pubDate>Sun, 04 Jan 2009 02:36:23 +0000</pubDate>
		<dc:creator>Fwolf</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[apt]]></category>
		<category><![CDATA[aptitude]]></category>
		<category><![CDATA[dependency]]></category>
		<category><![CDATA[intrepid]]></category>
		<category><![CDATA[libc]]></category>
		<category><![CDATA[Problem]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://www.fwolf.com/blog/?p=426</guid>
		<description><![CDATA[依然是采取从源升级的方式，不过却遇到了依赖性死循环：

fwolf@svr6:~$ sudo apt-get install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run `apt-get -f install' to correct these.
The following packages have unmet dependencies:
  libc6: Depends: findutils (&#62;= 4.4.0-2ubuntu2) but 4.2.28-2 is installed
  libc6-dev: Depends: libc6 (= 2.5-0ubuntu14) but 2.8~20080505-0ubuntu7 is installed
  [...]]]></description>
			<content:encoded><![CDATA[<p>依然是采取从源升级的方式，不过却遇到了依赖性死循环：</p>

<pre><code>fwolf@svr6:~$ sudo apt-get install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run `apt-get -f install' to correct these.
The following packages have unmet dependencies:
  libc6: Depends: findutils (&gt;= 4.4.0-2ubuntu2) but 4.2.28-2 is installed
  libc6-dev: Depends: libc6 (= 2.5-0ubuntu14) but 2.8~20080505-0ubuntu7 is installed
  libc6-i686: PreDepends: libc6 (= 2.5-0ubuntu14) but 2.8~20080505-0ubuntu7 is installed
E: Unmet dependencies. Try using -f.
</code></pre>

<p>使用<code>-f</code>参数也无济于事：</p>

<pre><code>fwolf@svr6:~$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  findutils libc6-dev libc6-i686
Suggested packages:
  mlocate locate slocate glibc-doc manpages-dev
The following packages will be upgraded:
  findutils libc6-dev libc6-i686
3 upgraded, 0 newly installed, 0 to remove and 362 not upgraded.
5 not fully installed or removed.
Need to get 0B/5077kB of archives.
After unpacking 1561kB of additional disk space will be used.
Do you want to continue [Y/n]? y
E: Couldn't configure pre-depend libc6 for findutils, probably a dependency cycle.
</code></pre>

<p>看到没，libc6依赖findutils 4.4以上，而升级findutils又依赖libc6，所以陷入死循环，可以尝试这样解决，前提是相关的deb包都已经用apt下载到了本地cache里：</p>

<pre><code>fwolf@svr6:~$ cd /var/cache/apt/archives
fwolf@svr6:/var/cache/apt/archives$ sudo dpkg --force-depends --install libc6_2.8~20080505-0ubuntu7_i386.deb findutils_4.4.0-2ubuntu3_i386.deb
</code></pre>

<p>强制直接安装这两个冤家包，然后是libc6相关的这两个重要包：</p>

<pre><code>sudo aptitude install libc6-i686 libc6-dev
</code></pre>

<p>然后，再进行其它upgrade就都正常了。</p>

<h4>参考</h4>

<p><a href="https://bugs.launchpad.net/ubuntu/+source/aptitude/+bug/124895">coreutils and debianutils dependency cycle on reinstall command</a></p>

	Tags: <a href="http://www.fwolf.com/blog/post/tag/apt" title="apt" rel="tag">apt</a>, <a href="http://www.fwolf.com/blog/post/tag/aptitude" title="aptitude" rel="tag">aptitude</a>, <a href="http://www.fwolf.com/blog/post/tag/dependency" title="dependency" rel="tag">dependency</a>, <a href="http://www.fwolf.com/blog/post/tag/intrepid" title="intrepid" rel="tag">intrepid</a>, <a href="http://www.fwolf.com/blog/post/tag/libc" title="libc" rel="tag">libc</a>, <a href="http://www.fwolf.com/blog/post/tag/problem" title="Problem" rel="tag">Problem</a>, <a href="http://www.fwolf.com/blog/post/tag/ubuntu" title="Ubuntu" rel="tag">Ubuntu</a>, <a href="http://www.fwolf.com/blog/post/tag/upgrade" title="upgrade" rel="tag">upgrade</a><br />

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://www.fwolf.com/blog/post/427" title="Intrepid中的php-sybase凑合能用了 (2009-01-04)">Intrepid中的php-sybase凑合能用了</a> (0)</li>
	<li><a href="http://www.fwolf.com/blog/post/428" title="升级到Ubuntu Intrepid后感觉到的一些变化 (2009-01-06)">升级到Ubuntu Intrepid后感觉到的一些变化</a> (0)</li>
	<li><a href="http://www.fwolf.com/blog/post/285" title="创建本地ubuntu mirror（镜像） (2007-02-05)">创建本地ubuntu mirror（镜像）</a> (2)</li>
	<li><a href="http://www.fwolf.com/blog/post/162" title="[ubuntu]安装vmware时找不到c header files的小问题 (2006-05-09)">[ubuntu]安装vmware时找不到c header files的小问题</a> (3)</li>
	<li><a href="http://www.fwolf.com/blog/post/152" title="[Ubuntu]使用点滴 (2006-07-08)">[Ubuntu]使用点滴</a> (7)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.fwolf.com/blog/post/426/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
