[gentoo-user] Re: error while loading shared libraries: libstdc++.so.6:

2018-01-02 Thread Kai Krakow
Am Tue, 02 Jan 2018 10:11:24 -0700 schrieb thelma:

> I was installing some brother driver simply run:

Don't do this... You should really not "install" software with tar.

You're just unpacking an archive, overwriting everything that
might be in its way.


> # tar zxvf ./hl5370dwlpr-2.0.3-1.i386.tar.gz -C /
> ./
> ./usr/
> ./usr/local/
> ./usr/local/Brother/
> ./usr/local/Brother/lpd/
> ./usr/local/Brother/lpd/psconvert2
> ./usr/local/Brother/lpd/filterHL5370DW
> ./usr/local/Brother/lpd/rawtobr2
> ./usr/local/Brother/inf/
> ./usr/local/Brother/inf/setupPrintcap
> ./usr/local/Brother/inf/paperinf
> ./usr/local/Brother/inf/brHL5370DWfunc
> ./usr/local/Brother/inf/braddprinter
> ./usr/local/Brother/inf/brHL5370DWrc
> ./usr/lib/
  ^^
This one replace the /usr/lib symlink with an empty directory.

> ./usr/lib/libbrcomplpr2.so

Move this file to lib64 instead.

Now:

# rmdir /usr/lib && ln -s lib64 /usr/lib

> ./usr/bin/
> ./usr/bin/brprintconflsr2
> ./var/
> ./var/spool/
> ./var/spool/lpd/
> ./var/spool/lpd/HL5370DW/
> 
> # tar zxvf ./cupswrapperHL5370DW-2.0.4-1.i386.tar.gz -C /
> ./
> ./usr/
> ./usr/local/
> ./usr/local/Brother/
> ./usr/local/Brother/cupswrapper/
> ./usr/local/Brother/cupswrapper/brcupsconfig3
> ./usr/local/Brother/cupswrapper/cupswrapperHL5370DW-2.0.4
> 
> Now, I can not run any emerge, eix etc command, I'm getting: 
> eix: error while loading shared libraries: libstdc++.so.6: cannot open shared 
> object file: No such file or directory
> 
> bash: emerge: command not found
> 
> However libstdc++ exists: 
> 
> locate libstdc++.so.6

Locate doesn't necessarily tell you that... It just tells you
that the file existed when the locate db was built (usually
by a cronjob at night).

See "man locate".


> /usr/lib64/gcc/x86_64-pc-linux-gnu/5.4.0/libstdc++.so.6
> /usr/lib64/gcc/x86_64-pc-linux-gnu/5.4.0/libstdc++.so.6.0.21
> /usr/lib64/gcc/x86_64-pc-linux-gnu/5.4.0/32/libstdc++.so.6
> /usr/lib64/gcc/x86_64-pc-linux-gnu/5.4.0/32/libstdc++.so.6.0.21
> /usr/lib64/gcc/x86_64-pc-linux-gnu/6.4.0/libstdc++.so.6
> /usr/lib64/gcc/x86_64-pc-linux-gnu/6.4.0/libstdc++.so.6.0.22
> /usr/lib64/gcc/x86_64-pc-linux-gnu/6.4.0/32/libstdc++.so.6
> /usr/lib64/gcc/x86_64-pc-linux-gnu/6.4.0/32/libstdc++.so.6.0.22
> /usr/share/gdb/auto-load/usr/lib64/gcc/x86_64-pc-linux-gnu/5.4.0/libstdc++.so.6.0.21-gdb.py
> /usr/share/gdb/auto-load/usr/lib64/gcc/x86_64-pc-linux-gnu/5.4.0/32/libstdc++.so.6.0.21-gdb.py
> /usr/share/gdb/auto-load/usr/lib64/gcc/x86_64-pc-linux-gnu/6.4.0/libstdc++.so.6.0.22-gdb.py
> /usr/share/gdb/auto-load/usr/lib64/gcc/x86_64-pc-linux-gnu/6.4.0/32/libstdc++.so.6.0.22-gdb.py
> 
> lib -> lib64 (exist in "/")

But no longer in /usr due to your brute force "installation".


-- 
Regards,
Kai

Replies to list-only preferred.




[gentoo-user] Re: error while loading shared libraries: libstdc++.so.6:

2018-01-02 Thread Nikos Chantziaras

On 02/01/18 20:14, the...@sys-concept.com wrote:

There should be al lot of packages in: /usr/lib
but my dir is almost empty only one file left:

-rwxr-xr-x  1 root root 53606 Sep 18  2008 libbrcomplpr2.so


Is there a /usr/lib64? If yes, try:

mv /usr/lib/libbrcomplpr2.so /usr/lib64/
rm -r /usr/lib
ln -s /usr/lib64 /usr/lib

It seems to me you have deleted the /usr/lib symlink somehow. The above 
commands should restore it and place libbrcomplpr2.so into /usr/lib64.