Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
I've made a bad mistake --Please help me [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
nobody13
Apprentice
Apprentice


Joined: 21 Jan 2006
Posts: 190

PostPosted: Thu Feb 23, 2012 8:20 pm    Post subject: I've made a bad mistake --Please help me [solved] Reply with quote

I had a conflict during an update, and without thinking about what it was, I uninstalled it thinking I could just reinstall the newer package.

Code:
WARNING: One or more updates have been skipped due to a dependency conflict:

sys-libs/zlib:0

  (sys-libs/zlib-1.2.6::gentoo, ebuild scheduled for merge) conflicts with
    <sys-libs/zlib-1.2.5.1-r1:0 required by (dev-db/virtuoso-server-6.1.3-r2::gentoo, installed)


It immediatly failed and now i can't emerge anything. Is this fixable or am i looking at a fresh install?

Code:
# emerge -av1 sys-libs/zlib
Traceback (most recent call last):
  File "/usr/bin/emerge", line 37, in <module>
    from _emerge.main import emerge_main
  File "/usr/lib64/portage/pym/_emerge/main.py", line 39, in <module>
    from _emerge.actions import action_config, action_sync, action_metadata, \
  File "/usr/lib64/portage/pym/_emerge/actions.py", line 11, in <module>
    import random
  File "/usr/lib64/python2.7/random.py", line 48, in <module>
    from binascii import hexlify as _hexlify
ImportError: libz.so.1: cannot open shared object file: No such file or directory


Last edited by nobody13 on Fri Feb 24, 2012 12:06 am; edited 1 time in total
Back to top
View user's profile Send private message
Voltago
Advocate
Advocate


Joined: 02 Sep 2003
Posts: 2593
Location: userland

PostPosted: Thu Feb 23, 2012 8:31 pm    Post subject: Reply with quote

Easily fixable. Post your
Code:
emerge --info

output and ask someone with a reasonably similar machine (same processor architecture should be fine, but let's see your system info first) to upload libz.so.X.Y.Z to somewhere. Put it into your /lib folder and create a symlink to /lib/libz.so.X. Btw what version of zlib where you using (check /var/log/emerge.log)? Finally, do
Code:
emerge -1 zlib

to properly re-install the package.
Back to top
View user's profile Send private message
Yuu
Apprentice
Apprentice


Joined: 23 Dec 2008
Posts: 223
Location: France

PostPosted: Thu Feb 23, 2012 8:32 pm    Post subject: Reply with quote

Hi nobody13,

maybe you could go to tinderbox.dev.gentoo.org and download the corresponding zlib to your arch.

Then, move-it to your PKGDIR: it should be /usr/portage/packages (check your emerge --info output).

Next, emerge your package using this command:
Code:
# emerge -K =sys-libs/zlib-1.2.5-r2


And now, you should be able to continue your emerge, as usual.


Good luck :]

--
Edit: well... too late!
_________________
Main laptop : T8300 cpu | 200 GB hard drive | 2 GB of ram | 8600M GT | Gentoo x86_64
Server : Celeron 220 cpu | 250 GB hard drive | 2 GB of ram | SiS 662 VGA | Gentoo x86_64
Back to top
View user's profile Send private message
Etal
Veteran
Veteran


Joined: 15 Jul 2005
Posts: 1931

PostPosted: Thu Feb 23, 2012 8:40 pm    Post subject: Reply with quote

... assuming of course that you can still download stuff. If you're lucky, you might still have a browser and a terminal still open.

If not, you'll have to find a liveCD and unpack it zlib manually. If you do that, be sure to re-emerge the same version as the one from tinderbox, or you'll have stray files left over.
_________________
“And even in authoritarian countries, information networks are helping people discover new facts and making governments more accountable.”– Hillary Clinton, Jan. 21, 2010
Back to top
View user's profile Send private message
nobody13
Apprentice
Apprentice


Joined: 21 Jan 2006
Posts: 190

PostPosted: Thu Feb 23, 2012 8:59 pm    Post subject: Reply with quote

Thanks everyone for the fast responses.

gcc-config -l and emerge --info don't work at this point

Code:
# gcc-config -l
 * gcc-config: Could not get portage CHOST!
 * gcc-config: You should verify that CHOST is set in one of these places:
 * gcc-config:  - //etc/make.conf
 * gcc-config:  - active environment
 
# emerge --info
Traceback (most recent call last):
  File "/usr/bin/emerge", line 37, in <module>
    from _emerge.main import emerge_main
  File "/usr/lib64/portage/pym/_emerge/main.py", line 39, in <module>
    from _emerge.actions import action_config, action_sync, action_metadata, \
  File "/usr/lib64/portage/pym/_emerge/actions.py", line 11, in <module>
    import random
  File "/usr/lib64/python2.7/random.py", line 48, in <module>
    from binascii import hexlify as _hexlify
ImportError: libz.so.1: cannot open shared object file: No such file or directory


Here's make.conf

Code:
CFLAGS="-march=nocona -O2 -pipe -ggdb"
CHOST="x86_64-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j4"
source /var/lib/layman/make.conf
PORTDIR_OVERLAY="/usr/local/portage"
LINGUAS="en en-US"
INPUT_DEVICES="evdev"
VIDEO_CARDS="nvidia"
GENTOO_MIRRORS="http://gentoo.mirrors.tds.net/gentoo/ "
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
ACCEPT_LICENSE="*"
FEATURES="splitdebug"


Firefox is dead but Konqueror still works hopefully i can download or ssh next step
Back to top
View user's profile Send private message
Etal
Veteran
Veteran


Joined: 15 Jul 2005
Posts: 1931

PostPosted: Thu Feb 23, 2012 9:17 pm    Post subject: Reply with quote

Here's the link if you can manage to download it: http://tinderbox.dev.gentoo.org/default-linux/amd64/sys-libs/zlib-1.2.5-r2.tbz2

Luckily, it's compressed with bzip2 :)
_________________
“And even in authoritarian countries, information networks are helping people discover new facts and making governments more accountable.”– Hillary Clinton, Jan. 21, 2010
Back to top
View user's profile Send private message
nobody13
Apprentice
Apprentice


Joined: 21 Jan 2006
Posts: 190

PostPosted: Thu Feb 23, 2012 9:32 pm    Post subject: Reply with quote

I have the file but there's no directory /usr/portage/package
Back to top
View user's profile Send private message
Etal
Veteran
Veteran


Joined: 15 Jul 2005
Posts: 1931

PostPosted: Thu Feb 23, 2012 9:36 pm    Post subject: Reply with quote

Well then, create one! :)

(Also, it's /usr/portage/packages)
_________________
“And even in authoritarian countries, information networks are helping people discover new facts and making governments more accountable.”– Hillary Clinton, Jan. 21, 2010
Back to top
View user's profile Send private message
nobody13
Apprentice
Apprentice


Joined: 21 Jan 2006
Posts: 190

PostPosted: Thu Feb 23, 2012 9:43 pm    Post subject: Reply with quote

made dir and copied it there also to /usr/portage/distfiles. Here's what I get

Code:
 # emerge -K =sys-libs/zlib-1.2.5-r2
Traceback (most recent call last):
  File "/usr/bin/emerge", line 37, in <module>
    from _emerge.main import emerge_main
  File "/usr/lib64/portage/pym/_emerge/main.py", line 39, in <module>
    from _emerge.actions import action_config, action_sync, action_metadata, \
  File "/usr/lib64/portage/pym/_emerge/actions.py", line 11, in <module>
    import random
  File "/usr/lib64/python2.7/random.py", line 48, in <module>
    from binascii import hexlify as _hexlify
ImportError: libz.so.1: cannot open shared object file: No such file or directory
Back to top
View user's profile Send private message
nobody13
Apprentice
Apprentice


Joined: 21 Jan 2006
Posts: 190

PostPosted: Thu Feb 23, 2012 9:47 pm    Post subject: Reply with quote

If I chroot from the gentoo disk will it reinstall by using emerge zlib?
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Thu Feb 23, 2012 9:52 pm    Post subject: Reply with quote

Just do what Voltago told you to do.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Etal
Veteran
Veteran


Joined: 15 Jul 2005
Posts: 1931

PostPosted: Thu Feb 23, 2012 9:56 pm    Post subject: Reply with quote

I don't think it will help to chroot, since portage needs zlib whether you are chrooted or not.

What I would do is unpack it manually, and then reinstall it so that it gets registered into portage:

Code:
# cd /
# tar xjvf .../zlib-1.2.5-r2.tbz2
# emerge -K =sys-libs/zlib-1.2.5-r2

_________________
“And even in authoritarian countries, information networks are helping people discover new facts and making governments more accountable.”– Hillary Clinton, Jan. 21, 2010
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54096
Location: 56N 3W

PostPosted: Thu Feb 23, 2012 11:05 pm    Post subject: Reply with quote

nobody13,

The dirty hack is to boot the liveCD, mount your filesystems as you did during the install but do not chroot.
Copy zlib-1.2.5-r2.tbz2 to /mnt/gentoo as thats the root of your real Gentoo install
cd to /mnt/gentoo
then tar xpf zlib-1.2.5-r2.tbz2

The advantage of this over Etals post is that you get to use a fully working environment for tar.
The p option is included to preserve permissions. You need that or eXecute permission will be removed and zlib still won't work

When tar completes, you will get a waring about extra garbage at end ignored. Thats expected as the file you started with was a binary packages for use by portage. It has some extra stuff at the end that is no use to tar.

Now reboot into your own gentoo and
Code:
emerge -1 zlib

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
nobody13
Apprentice
Apprentice


Joined: 21 Jan 2006
Posts: 190

PostPosted: Fri Feb 24, 2012 12:14 am    Post subject: Reply with quote

Thank you both for the help. It's reinstalled and working again.
Back to top
View user's profile Send private message
lo-jay
l33t
l33t


Joined: 27 Feb 2005
Posts: 862

PostPosted: Fri Mar 09, 2012 1:21 am    Post subject: Reply with quote

wow, did the same stupid mistake...

so nobody 13, which of the the two different procedures did you follow?

i mean how exactly did you re-install it???


cheers!

ps: did untar the file, but still can't emerge:

Code:
tux5 packages # tar xjvf zlib-1.2.5-r2.tbz2
./
./usr/
./usr/lib64/
./usr/lib64/pkgconfig/
./usr/lib64/pkgconfig/zlib.pc
./usr/lib64/libz.a
./usr/lib64/libz.so
./usr/share/
./usr/share/man/
./usr/share/man/man3/
./usr/share/man/man3/zlib.3.bz2                                                                                                                                         
./usr/share/doc/                                                                                                                                                       
./usr/share/doc/zlib-1.2.5-r2/                                                                                                                                         
./usr/share/doc/zlib-1.2.5-r2/rfc1950.txt.bz2                                                                                                                           
./usr/share/doc/zlib-1.2.5-r2/FAQ.bz2
./usr/share/doc/zlib-1.2.5-r2/README.bz2
./usr/share/doc/zlib-1.2.5-r2/ChangeLog.bz2
./usr/share/doc/zlib-1.2.5-r2/algorithm.txt.bz2
./usr/share/doc/zlib-1.2.5-r2/rfc1951.txt.bz2
./usr/share/doc/zlib-1.2.5-r2/rfc1952.txt.bz2
./usr/share/doc/zlib-1.2.5-r2/txtvsbin.txt.bz2
./usr/include/
./usr/include/zlib.h
./usr/include/zconf.h
./lib64/
./lib64/libz.so.1
./lib64/libz.so.1.2.5

bzip2: (stdin): trailing garbage after EOF ignored
tux5 packages # emerge -K =sys-libs/zlib-1.2.5-r2
Traceback (most recent call last):
  File "/usr/bin/emerge", line 37, in <module>
    from _emerge.main import emerge_main
  File "/usr/lib64/portage/pym/_emerge/main.py", line 39, in <module>
    from _emerge.actions import action_config, action_sync, action_metadata, \
  File "/usr/lib64/portage/pym/_emerge/actions.py", line 11, in <module>
    import random
  File "/usr/lib64/python2.7/random.py", line 48, in <module>
    from binascii import hexlify as _hexlify
ImportError: libz.so.1: cannot open shared object file: No such file or directory

_________________
lo-jay

The mechanic "One of 'em Dodge Chargers - let him go by."
The driver "Not today!"

taken from "Two Lane Blacktop"
Back to top
View user's profile Send private message
Yuu
Apprentice
Apprentice


Joined: 23 Dec 2008
Posts: 223
Location: France

PostPosted: Fri Mar 09, 2012 9:36 am    Post subject: Reply with quote

Hi lo-jay,

did you try tar with the p argument, like NeddySeagoon said ?

NeddySeagoon wrote:
then tar xpf zlib-1.2.5-r2.tbz2

The advantage of this over Etals post is that you get to use a fully working environment for tar.
The p option is included to preserve permissions. You need that or eXecute permission will be removed and zlib still won't work

_________________
Main laptop : T8300 cpu | 200 GB hard drive | 2 GB of ram | 8600M GT | Gentoo x86_64
Server : Celeron 220 cpu | 250 GB hard drive | 2 GB of ram | SiS 662 VGA | Gentoo x86_64
Back to top
View user's profile Send private message
Etal
Veteran
Veteran


Joined: 15 Jul 2005
Posts: 1931

PostPosted: Sat Mar 10, 2012 4:36 am    Post subject: Reply with quote

Quote:
packages # tar xjvf zlib-1.2.5-r2.tbz2


You're un-taring the stuff into the package directory. "cd / " first. ;)
_________________
“And even in authoritarian countries, information networks are helping people discover new facts and making governments more accountable.”– Hillary Clinton, Jan. 21, 2010
Back to top
View user's profile Send private message
nobody13
Apprentice
Apprentice


Joined: 21 Jan 2006
Posts: 190

PostPosted: Sun Mar 11, 2012 4:46 pm    Post subject: Reply with quote

lo-jay wrote:
wow, did the same stupid mistake...

so nobody 13, which of the the two different procedures did you follow?

i mean how exactly did you re-install it???


cheers!

ps: did untar the file, but still can't emerge:

Code:
tux5 packages # tar xjvf zlib-1.2.5-r2.tbz2
./
./usr/
./usr/lib64/
./usr/lib64/pkgconfig/
./usr/lib64/pkgconfig/zlib.pc
./usr/lib64/libz.a
./usr/lib64/libz.so
./usr/share/
./usr/share/man/
./usr/share/man/man3/
./usr/share/man/man3/zlib.3.bz2                                                                                                                                         
./usr/share/doc/                                                                                                                                                       
./usr/share/doc/zlib-1.2.5-r2/                                                                                                                                         
./usr/share/doc/zlib-1.2.5-r2/rfc1950.txt.bz2                                                                                                                           
./usr/share/doc/zlib-1.2.5-r2/FAQ.bz2
./usr/share/doc/zlib-1.2.5-r2/README.bz2
./usr/share/doc/zlib-1.2.5-r2/ChangeLog.bz2
./usr/share/doc/zlib-1.2.5-r2/algorithm.txt.bz2
./usr/share/doc/zlib-1.2.5-r2/rfc1951.txt.bz2
./usr/share/doc/zlib-1.2.5-r2/rfc1952.txt.bz2
./usr/share/doc/zlib-1.2.5-r2/txtvsbin.txt.bz2
./usr/include/
./usr/include/zlib.h
./usr/include/zconf.h
./lib64/
./lib64/libz.so.1
./lib64/libz.so.1.2.5

bzip2: (stdin): trailing garbage after EOF ignored
tux5 packages # emerge -K =sys-libs/zlib-1.2.5-r2
Traceback (most recent call last):
  File "/usr/bin/emerge", line 37, in <module>
    from _emerge.main import emerge_main
  File "/usr/lib64/portage/pym/_emerge/main.py", line 39, in <module>
    from _emerge.actions import action_config, action_sync, action_metadata, \
  File "/usr/lib64/portage/pym/_emerge/actions.py", line 11, in <module>
    import random
  File "/usr/lib64/python2.7/random.py", line 48, in <module>
    from binascii import hexlify as _hexlify
ImportError: libz.so.1: cannot open shared object file: No such file or directory



HI, I used the file from the site that Yuu mentioned above. Get the same version that you uninstalled and save it at /. Then boot to the gentoo cd, mount your root partition and extract it (tar xjfp). Reboot and emerge the same version. Then emerge -ua zlib.

The file didn't extract correctly until I used the cd as Neddyseagoon mentioned. I think tar died with the rest of the programs when I broke it .
Back to top
View user's profile Send private message
lil_liminal
n00b
n00b


Joined: 19 Nov 2011
Posts: 51
Location: Bangkok, Thailand

PostPosted: Tue Dec 11, 2012 12:06 pm    Post subject: Reply with quote

Just wanted to chime in, this worked for me so thanks for the help.
For future noobs like me:
I went to tinderbox and downloaded the zlib from http://tinderbox.dev.gentoo.org/default-linux/x86/sys-libs/
In console i went to the directory i downloaded it to:
I then did su and then did:
mv name of zlib tbz2 /
i then did cd /
and a tar xjvf on the zlib package and everything works fine now.
basically you have to extract it from root as root.
Back to top
View user's profile Send private message
schhub
n00b
n00b


Joined: 11 Sep 2013
Posts: 1
Location: France

PostPosted: Wed Sep 11, 2013 6:05 am    Post subject: Reply with quote

Hi all,
:oops: i also made the same mistake, but i'm now looking for zlib-1.2.7 and i can't find it for download.
How can i solve this problem then ? tried to copy from an other PC (but not in same version) some files like /lib/libz.so.1.2.7 /usr/lib/libz.so /usr/include/zlib.h
/usr/include/zconf.h but it's not working :? :cry:

Ok sorry for re-opening , and i found a way to resolve it, i downloaded latest stage3 untared it and copied the different "zlib" files from stage3/lib and stage3/usr/lib /stage3/usr/include to their destination.
After i could re-emerge sys-libs/zlib again and all was working correctly !!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum