0

Hello I'm using gentoo not for a long time and have made such mistake: I've removed zlib package from system. Now i've got my portage system corrupted:

# 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

How can I reinstall zlib package and repair system?

updated

Problem solved. I've copied object file /lib/libz.so.1 from other machine and then I can run emerge and install zlib package in normal way.

Thanks to PowerSp00n

3 Answers 3

3

Theoretically you can download the stage3 file used for installation and restore the missing files. When emerge is working again reinstall zlib with emerge -av1 zlib.

1

Pre-built binary packages are available on http://tinderbox.dev.gentoo.org/ — check it out next time you run into a problem like this.

0

Also when you remove packages, I suggest using emerge -pv --depclean pkgname because it won't let you unmerge a package if things depend on it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .