Gentoo

gentoo zlib 被移除 = portage 損壞

  • January 5, 2011

您好,我使用 gentoo 的時間不長,並且犯了這樣的錯誤:我已經從系統中刪除了 zlib 包。現在我的portage系統損壞了:

# emerge --sync
Traceback (most recent call last):
 File "/usr/bin/emerge", line 36, in <module>
   from _emerge.main import emerge_main
 File "/usr/lib64/portage/pym/_emerge/main.py", line 41, in <module>
   from _emerge.actions import action_config, action_sync, action_metadata, \
 File "/usr/lib64/portage/pym/_emerge/actions.py", line 44, in <module>
   from _emerge.depgraph import backtrack_depgraph, depgraph, resume_depgraph
 File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 40, in <module>
   from _emerge.FakeVartree import FakeVartree
 File "/usr/lib64/portage/pym/_emerge/FakeVartree.py", line 11, in <module>
   from portage.dbapi.vartree import vartree
 File "/usr/lib64/portage/pym/portage/dbapi/vartree.py", line 56, in <module>
   import re, shutil, stat, errno, copy, subprocess
 File "/usr/lib64/python2.6/subprocess.py", line 430, in <module>
   import pickle
 File "/usr/lib64/python2.6/pickle.py", line 1258, in <module>
   import binascii as _binascii
ImportError: libz.so.1: cannot open shared object file: No such file or directory

如何重新安裝 zlib 包和修復系統?

更新

問題解決了。我已經/lib/libz.so.1從其他機器複製了目標文件,然後我可以以正常方式執行emerge和安裝zlib包。

謝謝PowerSp00n

理論上,您可以下載用於安裝的 stage3 文件並恢復失去的文件。何時emerge再次使用 重新zlib安裝emerge -av1 zlib

預先建構的二進制包可以在http://tinderbox.dev.gentoo.org/上找到——下次遇到這樣的問題時檢查一下。

引用自:https://serverfault.com/questions/145761