更新出问题,libc6-dev : 依赖: libc6
Tofloor
poster avatar
abcat513
deepin
2013-11-24 19:57
Author
最近突然无法安装软件,在论坛提问后http://www.linuxdeepin.com/forum/23/16095得出结论,需要升级了。
使用
sudo apt-get update
sudo apt-get upgrade
升级出现
research@deepin:~$ sudo apt-get upgrade
正在读取软件包列表... 完成
正在分析软件包的依赖关系树      
正在读取状态信息... 完成      
您也许需要运行“apt-get -f install”来修正上面的错误。
下列软件包有未满足的依赖关系:
libc6-dev : 依赖: libc6 (= 2.17-0ubuntu5.1) 但是 2.17-0ubuntu5 已经安装
E: 不能满足依赖关系。不妨试一下 -f 选项。

使用
sudo apt-get -f install出现
(正在读取数据库 ... 系统当前共安装有 3126 个文件和目录。)
正预备替换 libc6:amd64 2.17-0ubuntu5 (使用 .../libc6_2.17-0ubuntu5.1_amd64.deb) ...
正在反配置 libc6:i386 ...

A copy of the C library was found in an unexpected directory:
  '/lib/x86_64-linux-gnu/libc-2.17.so'
It is not safe to upgrade the C library in this situation;
please remove that copy of the C library or get it out of
'/lib/x86_64-linux-gnu' and try again.

dpkg: error processing /var/cache/apt/archives/libc6_2.17-0ubuntu5.1_amd64.deb (--unpack):
子进程 新的 pre-installation 脚本 返回了错误号 1
正预备替换 libc6:i386 2.17-0ubuntu5 (使用 .../libc6_2.17-0ubuntu5.1_i386.deb) ...
正在反配置 libc6:amd64 ...

A copy of the C library was found in an unexpected directory:
  '/lib/i386-linux-gnu/libc-2.17.so'
It is not safe to upgrade the C library in this situation;
please remove that copy of the C library or get it out of
'/lib/i386-linux-gnu' and try again.

dpkg: error processing /var/cache/apt/archives/libc6_2.17-0ubuntu5.1_i386.deb (--unpack):
子进程 新的 pre-installation 脚本 返回了错误号 1
在处理时有错误发生:
/var/cache/apt/archives/libc6_2.17-0ubuntu5.1_amd64.deb
/var/cache/apt/archives/libc6_2.17-0ubuntu5.1_i386.deb
localepurge: Disk space freed in /usr/share/locale: 0 KiB
localepurge: Disk space freed in /usr/share/man: 0 KiB
localepurge: Disk space freed in /usr/share/gnome/help: 0 KiB
localepurge: Disk space freed in /usr/share/omf: 0 KiB

Total disk space freed by localepurge: 0 KiB

这时要怎么办啊?
请不要说重装之类的话了,大家在Windows下也不会出问题就重装吧。
Reply Favorite View the author
All Replies
cxbii
deepin
2013-11-24 20:23
#1
http://wiki.linuxdeepin.com/index.php?t ... 8.E4.B8.80

相同处理,有问题,优先百科
Reply View the author
abcat513
deepin
2013-11-24 22:36
#2
如果能够在百科里解决就不在这里问了

sudo dpkg --configure -a
sudo mkdir info
sudo dpkg --configure -a
dpkg: dependency problems prevent configuration of libc6-dev:amd64:
libc6-dev:amd64 依赖于 libc6 (= 2.17-0ubuntu5.1);然而:
系统中 libc6:amd64 的版本为 2.17-0ubuntu5。

dpkg: error processing libc6-dev:amd64 (--configure):
依赖关系问题 - 仍未被配置
在处理时有错误发生:
libc6-dev:amd64

我查了外国的debian论坛和ubuntuask,基本上都没有办法解决。
直接删除libc***.so,出现严重错误,所有命令都无法使用,不得不用LiveCD恢复。
目前暂时不准备安装软件和更新了
Reply View the author
electricface
deepin
2013-11-25 03:04
#3
试试这个命令
sudo apt-cache policy libc6

sudo apt-get install libc6
请贴出命令的执行结果和报错。
Reply View the author
cxbii
deepin
2013-11-25 17:32
#4
版本冲突。你有没有安装过软件中心以外的软件呢?
Reply View the author
abcat513
deepin
2013-11-26 01:26
#5
sudo apt-cache policy libc6
libc6:
  已安装:  2.17-0ubuntu5
  候选软件包:2.17-0ubuntu5.1
  版本列表:
     2.17-0ubuntu5.1 0
        400 ftp://mirror.lzu.edu.cn/ubuntu/ raring-security/main amd64 Packages
        400 ftp://mirror.lzu.edu.cn/ubuntu/ raring-updates/main amd64 Packages
*** 2.17-0ubuntu5 0
        400 ftp://mirror.lzu.edu.cn/ubuntu/ raring/main amd64 Packages
        100 /var/lib/dpkg/status
research@deepin:~$ sudo apt-get install libc6
正在读取软件包列表... 完成
正在分析软件包的依赖关系树      
正在读取状态信息... 完成      
您可能需要运行“apt-get -f install”来纠正下列错误:
下列软件包有未满足的依赖关系:
libc6 : 破坏: libc6:i386 (!= 2.17-0ubuntu5.1) 但是 2.17-0ubuntu5 正要被安装
libc6:i386 : 破坏: libc6 (!= 2.17-0ubuntu5) 但是 2.17-0ubuntu5.1 正要被安装
E: 有未能满足的依赖关系。请尝试不指明软件包的名字来运行“apt-get -f install”(也可以指定一个解决办法)。

下列软件包有未满足的依赖关系:
libc6-dev : 依赖: libc6 (= 2.17-0ubuntu5.1) 但是 2.17-0ubuntu5 正要被安装
E: 有未能满足的依赖关系。请尝试不指明软件包的名字来运行“apt-get -f install”(也可以指定一个解决办法)。
Reply View the author
abcat513
deepin
2013-11-26 01:28
#6
自己编译了几个软件用,分别是Gromacs4.5 和Pymol1.6.1
因为源里提供的Pymol1.5有Bug,生成的蛋白质一级结构是乱的,不能使用。所以手动编译了Pymol,使用apt-get安装了一些开发库。不知道是否是因为编译了这些软件而产生的问题?
  1. OpenGL
  2. GLUT library for OpenGL (or freeglut)
  3. Python (v 2.1 or better) compiled with threads support
  4. libpng (can compiled without it, but image saves won't work)
  5. Tcl/Tk (for the external GUI)
  6. Numerical Python (technically optional - now using numpy instead)
  7. Python megawidgets (Pmw -- only required for the "external" GUI)
  8. FreeType2 (if you want nice fonts)
Reply View the author
cxbii
deepin
2013-11-26 01:29
#7
自己编译了几个软件用,分别是Gromacs4.5 和Pymol1.6.1
因为源里提供的Pymol1.5有Bug,生成的蛋白质一级结构是乱的,不能使用。所以手动编译了Pymol,使用apt-get安装了一些开发库。不知道是否是因为编译了这些软件而产生的问题?
明显是这些包导致冲突了啊。。。
  1. sudo aptitude -f install
Copy the Code
试试
Reply View the author
abcat513
deepin
2013-11-26 01:34
#8
依然不行:
dpkg: error processing libc6-dev:amd64 (--configure):
依赖关系问题 - 仍未被配置
在处理时有错误发生:
libc6-dev:amd64

现在准备到http://packages.ubuntu.com/en/raring-updates/amd64/libc6-dev/download直接下载这个包安装一下试试。
Reply View the author
cxbii
deepin
2013-11-26 01:46
#9
没办法,我能力有限,你得自己解决了

这个也是我们不推荐在软件中心以外安装软件的原因了

Pymol这个软件我会上报更新的
Reply View the author
abcat513
deepin
2013-11-26 01:47
#10
强制安装后,还是无法使用。

dpkg -l |grep libc6
ii  libc6:amd64                                         2.17-0ubuntu5                                 amd64        Embedded GNU C Library: Shared libraries
ii  libc6:i386                                          2.17-0ubuntu5                                 i386         Embedded GNU C Library: Shared libraries
ii  libc6-dev:amd64                                     2.17-0ubuntu5.1                               amd64        Embedded GNU C Library: Development Libraries and Header Files
rc  libc6-i386                                          2.17-0ubuntu5                                 amd64        Embedded GNU C Library: 32-bit shared libraries for AMD64
看来是多安装了一个libc6的库,而我尝试手动删除后会出现bash无法找到libc6.so,什么都干不了。奇怪了
Reply View the author
woodelf
deepin
2013-11-26 01:51
#11
强制安装后,还是无法使用。

dpkg -l |grep libc6
ii  libc6:amd64                                         2.17-0ubuntu5                                 amd64        Embedded GNU C Library: Shared libraries
ii  libc6:i386                                          2.17-0ubuntu5                                 i386         Embedded GNU C Library: Shared libraries
ii  libc6-dev:amd64                                     2.17-0ubuntu5.1                               amd64        Embedded GNU C Library: Development Libraries and Header Files
rc  libc6-i386                                          2.17-0ubuntu5                                 amd64        Embedded GNU C Library: 32-bit shared libraries for AMD64
看来是多安装了一个libc6的库,而我尝试手动删除后会出现bash无法找到libc6.so,什么都干不了。奇怪了
你胆子真大……C库这种系统核心的包也敢删。不出意外的话,系统已经挂掉了。
试试看还能不能安装新包,不能的话,要么重装,要么找LiveCD去修复吧。
Reply View the author
electricface
deepin
2013-11-26 05:07
#12
感觉是dpkg 疯了,快给debian报bug吧。
libc6 : 破坏: libc6:i386 (!= 2.17-0ubuntu5.1) 但是 2.17-0ubuntu5 正要被安装
libc6:i386 : 破坏: libc6 (!= 2.17-0ubuntu5) 但是 2.17-0ubuntu5.1 正要被安装
Reply View the author
electricface
deepin
2013-11-26 05:13
#13
试试
  1. sudo apt-get install libc=2.17-0ubuntu5.1
  2. sudo apt-get install libc:i386=2.17-0ubuntu5.1
Copy the Code
不知有用吗?
Reply View the author
abcat513
deepin
2013-11-26 07:01
#14
已经完蛋了,重新安装了。
在网络上找到了一些关于更改LD_PRELOAD,LD_LIBRARY_PATH的文章,尝试修复,结果把系统弄完蛋了。LiveCD也没有修复成功(用的LinuxMint16的LiveCD),只好重新安装了。
最近尝试了很多发型版和DE,Lubuntu、Ubuntu13.04、LinuxMint16和Deepin,感觉最方便用的话还是Deepin,细节上最好的是LinuxMint,最稳定的是Ubuntu(唯一可以轻松使用ATI闭源驱动的),最快的(现在在一台老机上用)是Lubuntu。
发现生产平台使用不稳定的发生版当真比较头痛,怪不得很多服务器用得都是比较古老的版本,折腾不起啊。
如此看来Ubuntu的发行LTS的理念当真不错,Mint也有支持LTS,深度在稳定DE之后能否跟随Ubuntu的脚步,也推出LTS呢?
Reply View the author
abcat513
deepin
2013-11-26 07:10
#15
在Ubuntu论坛找到了一个回答,个人感觉比较靠谱:
so heres what i did:
Copy /lib/i386-linux-gnu/libc-2.13.so to /lib/delme
Copy every file from /lib/i386-linux-gnu/ that apt-get complain about to /lib/delme
Edit /etc/ld.so.conf.d/libc.conf and add there "/lib/delme"
Run sudo ldconfig -v
(This step is danger, I have a running "sudo mc" in case something goes wrong) Now you can safely delete files from /lib/i386-linux-gnu/ you just copied
Run "sudo apt-get -f install" and it should work now
Finally remove entry from /etc/ld.so.conf.d/libc.conf and delete /lib/delme
因为我在修改libc库位置的时候,没有使用ldconfig,而是手动使用export导入LD_PRELOAD,LD_LIBRARY_PATH,结果导入得不正确,有一些库文件落下了。使得所有bash命令都无法运行(此时内核还是可以用,打开的程序都正常),想再cp回去都不行。重启后因为参数的改变,也无法启动,LiveCD修复也失败了。
根据我折腾的经验(失败经验),如果有人遇到相同的问题,请严格按照上面的过程执行。
Reply View the author
abcat513
deepin
2013-11-26 07:15
#16
参考文献:
1、A copy of the C library was found in an unexpected directoryhttp://blog.i-al.net/2013/03/a-c ... expected-directory/
2、A copy of the C library was found in an unexpected directory: '/lib/i386-linux-gnu/http://ubuntuforums.org/showthread.php?t=1940074

不知道这些回答能否进入Wiki?
Reply View the author
cxbii
deepin
2013-11-26 17:55
#17
参考文献:
1、A copy of the C library was found in an unexpected directoryhttp://blog.i-al.net/2013/03/a-c ... expected-directory/
2、A copy of the C library was found in an unexpected directory: '/lib/i386-linux-gnu/http://ubuntuforums.org/showthread.php?t=1940074

不知道这些回答能否进入Wiki?
我英文不好,但是还是看懂了 :

但是这个不是常规的解决办法,我怕这个会有什么后遗症,我个人是不推荐写在百科的

但是百科是自由的。你可以加入的啦
Reply View the author
abcat513
deepin
2013-11-26 18:52
#18
也是,这么高危而且不太通用的操作还是放在论坛与个人博客中比较好。如果有人有需要的话应该可以搜索到的,感谢版主一直的回复与帮助。
Reply View the author
cxbii
deepin
2013-11-26 18:59
#19
也是,这么高危而且不太通用的操作还是放在论坛与个人博客中比较好。如果有人有需要的话应该可以搜索到的,感谢版主一直的回复与帮助。
其实这个算我们没做好吧,你说的那个软件,我们软件仓库的管理者将会稍后处理,现在有点其他事情。如果测试通过,一般会更新的~
Reply View the author
ahcute
deepin
2013-11-27 08:14
#20
跟我的问题一样。。。我把文件删了,,,所以进不去了,,,明天拿liveCD修复一下。。。
Reply View the author