LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   no version information available (https://www.linuxquestions.org/questions/ubuntu-63/no-version-information-available-870413/)

mahmoodn 03-23-2011 03:13 AM

no version information available
 
Hi,
When I run apt-get command I get some errors. For example this:
Code:

mahmood@localhost:~$ sudo apt-get update
apt-get: /usr/local/lib/libstdc++.so.6: no version information available (required by apt-get)
apt-get: /usr/local/lib/libstdc++.so.6: no version information available (required by apt-get)
apt-get: /usr/local/lib/libstdc++.so.6: no version information available (required by apt-get)
apt-get: /usr/local/lib/libstdc++.so.6: no version information available (required by apt-get)
apt-get: /usr/local/lib/libstdc++.so.6: no version information available (required by /usr/lib/libapt-pkg.so.4.10)
apt-get: /usr/local/lib/libstdc++.so.6: no version information available (required by /usr/lib/libapt-pkg.so.4.10)
apt-get: /usr/local/lib/libstdc++.so.6: no version information available (required by /usr/lib/libapt-pkg.so.4.10)
apt-get: /usr/local/lib/libstdc++.so.6: no version information available (required by /usr/lib/libapt-pkg.so.4.10)
apt-get: relocation error: /usr/lib/libapt-pkg.so.4.10: symbol _ZNKSt5ctypeIcE13_M_widen_initEv, version GLIBCXX_3.4.11 not defined in file libstdc++.so.6 with link time reference

thanks for any feedback

corp769 03-23-2011 06:25 AM

Edit /usr/lib/libc.conf and comment out the default /usr/local/lib and add /usr/lib. That should do the trick for you.

Cheers,

Josh

mahmoodn 03-23-2011 06:30 AM

same error after changing that file.....
Code:

mahmood@localhost:~$ cat /etc/ld.so.conf.d/libc.conf
# libc default configuration
/usr/lib
#/usr/local/lib
mahmood@localhost:~$ sudo apt-get update
apt-get: /usr/local/lib/libstdc++.so.6: no version information available (required by apt-get)
apt-get: /usr/local/lib/libstdc++.so.6: no version information available (required by apt-get)
apt-get: /usr/local/lib/libstdc++.so.6: no version information available (required by apt-get)
apt-get: /usr/local/lib/libstdc++.so.6: no version information available (required by apt-get)
apt-get: /usr/local/lib/libstdc++.so.6: no version information available (required by /usr/lib/libapt-pkg.so.4.10)
apt-get: /usr/local/lib/libstdc++.so.6: no version information available (required by /usr/lib/libapt-pkg.so.4.10)
apt-get: /usr/local/lib/libstdc++.so.6: no version information available (required by /usr/lib/libapt-pkg.so.4.10)
apt-get: /usr/local/lib/libstdc++.so.6: no version information available (required by /usr/lib/libapt-pkg.so.4.10)
apt-get: relocation error: /usr/lib/libapt-pkg.so.4.10: symbol _ZNKSt5ctypeIcE13_M_widen_initEv, version GLIBCXX_3.4.11 not defined in file libstdc++.so.6 with link time reference


corp769 03-23-2011 06:38 AM

How many variants of libc.conf do you have on your system?

mahmoodn 03-23-2011 06:56 AM

You mean this?
Code:

mahmood@localhost:~$ sudo find / -name "libc.conf"
/etc/ld.so.conf.d/libc.conf
mahmood@localhost:~$


knudfl 03-23-2011 06:57 AM

Why look for 'libc.conf' ( or change it ) when the issue is libstdc++ ?

GLIBCXX_3.4.11 : LIBCXX means libc++ = libstdc++

The object GLIBCXX_3.4.11 is from libstdc++.so.6, the gcc/g++ "c++ library".
( readelf -s /usr/lib/libstdc++.so.6 | grep GLIBCXX ).

Which OS is it ? Ubuntu 10.10 or Ubuntu 11.04 ? ?
And did you do any changes : Like installing g++-4.5 ?

..

mahmoodn 03-23-2011 07:00 AM

it is lubuntu 10.10 and I have installed GCC 4.1.2 from source. By default gcc 4.4 is installed. I used that to make and install gcc 4.1.2

corp769 03-23-2011 07:02 AM

I said what I said before because I came across a few success stories of doing it that way.

knudfl 03-23-2011 07:26 AM

Quote:

I have installed GCC 4.1.2 from source
If you have installed to a system path, you now have a wrong libstdc++.
A home made gcc must be installed to a hideaway location, like
/usr/local/gcc412/ or /opt/gcc412/. (../gcc-4.1.2/configure --prefix=/usr/local/gcc412 )

Suggest : Remove the alien files from your "GCC 4.1.2 install".
And reinstall libstdc++6 manually : sudo dpkg -i --force-all <package>
http://packages.ubuntu.com/maverick/libstdc++6
32bits http://se.archive.ubuntu.com/ubuntu/...untu2_i386.deb
64bits http://se.archive.ubuntu.com/ubuntu/...ntu2_amd64.deb

When 'apt-get' and Synaptic work again, you can reinstall all g++,
all dependencies for g++, g++-4.4.
The dependencies depend on some other packages : Also install these.


Installing gcc/g++-4.1.2 : sudo apt-get install g++-4.1
.. You will have to add 'hardy' to /etc/apt/sources.list
Code:

deb http://76.73.4.58/ubuntu/ hardy-updates main
deb http://76.73.4.58/ubuntu/ hardy universe
deb http://security.ubuntu.com/ubuntu hardy-security main
deb http://security.ubuntu.com/ubuntu hardy-security universe

P.S. : You can have as many compilers as you want, installed at the same time.
Available are : g++-3.3 g++-3.4 g++-4.1 g++-4.2 g++-4.3 g++-4.4 g++-4.5.

..

mahmoodn 03-23-2011 07:49 AM

Quote:

Suggest : Remove the alien files from your "GCC 4.1.2 install".
Exactly what should I run?

knudfl 03-23-2011 11:30 AM

OK, I guess you can leave the gcc-4.1.2 files for now, and let them be
overwritten by files from the default gcc-4.4 when / if you reinstall that.
( There is no 'make uninstall' for gcc.)
( And there should be no other conflicting files than libstdc++.so.6,
but no guaranties for that.)

A simple solution to solve the libstdc++.so.6 issues :
1) cd /usr/lib/
2) sudo rm libstdc++.so.6
3) sudo ln -s libstdc++.so.6.0.14 libstdc++.so.6

Then you should have the right version of libstdc++.so.6 again,
and can use 'apt-get' etc.

..

mahmoodn 03-23-2011 11:41 AM

No change....
Code:

mahmood@localhost:~$ cd /usr/lib/
mahmood@localhost:lib$ sudo rm libstdc++.so.6
[sudo] password for mahmood:
mahmood@localhost:lib$ sudo ln libstdc++.so.6.0.14 libstdc++.so.6
mahmood@localhost:lib$ sudo apt-get update
apt-get: /usr/local/lib/libstdc++.so.6: no version information available (required by apt-get)
apt-get: /usr/local/lib/libstdc++.so.6: no version information available (required by apt-get)
apt-get: /usr/local/lib/libstdc++.so.6: no version information available (required by apt-get)
apt-get: /usr/local/lib/libstdc++.so.6: no version information available (required by apt-get)
apt-get: /usr/local/lib/libstdc++.so.6: no version information available (required by /usr/lib/libapt-pkg.so.4.10)
apt-get: /usr/local/lib/libstdc++.so.6: no version information available (required by /usr/lib/libapt-pkg.so.4.10)
apt-get: /usr/local/lib/libstdc++.so.6: no version information available (required by /usr/lib/libapt-pkg.so.4.10)
apt-get: /usr/local/lib/libstdc++.so.6: no version information available (required by /usr/lib/libapt-pkg.so.4.10)
apt-get: relocation error: /usr/lib/libapt-pkg.so.4.10: symbol _ZNKSt5ctypeIcE13_M_widen_initEv, version GLIBCXX_3.4.11 not defined in file libstdc++.so.6 with link time reference


knudfl 03-23-2011 12:01 PM

Not quite correct : sudo ln libstdc++.so.6.0.14 libstdc++.so.6

Must be : sudo ln -s libstdc++.so.6.0.14 libstdc++.so.6

You will of course have to delete /usr/local/lib/libstdc++.so.6.

I wonder how /usr/local/lib/ can be first in the LD_LIBRARY_PATH ?
Seems that some other changes have been made ? ? .bashrc ? /etc/ld.so.conf ?

..

mahmoodn 03-24-2011 12:10 AM

The error message changed....!! this is what I did:
Code:

mahmood@localhost:lib$ sudo rm libstdc++.so.6
mahmood@localhost:lib$ sudo ln -s libstdc++.so.6.0.14 libstdc++.so.6
mahmood@localhost:lib$ sudo mv /usr/local/lib/libstdc++.so.6 /usr/local/lib/libstdc++.so.6.old
mahmood@localhost:lib$ ls -l libstdc*
lrwxrwxrwx 1 root root    19 2011-03-24 09:37 libstdc++.so.6 -> libstdc++.so.6.0.14
-rw-r--r-- 1 root root 930044 2010-09-28 00:31 libstdc++.so.6.0.14
mahmood@localhost:lib$ cat /etc/ld.so.conf.d/libc.conf
# libc default configuration
/usr/local/lib
mahmood@localhost:lib$ echo $LD_LIBRARY_PATH

mahmood@localhost:lib$ sudo apt-get update
apt-get: /usr/local/lib/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/libstdc++.so.6)
mahmood@localhost:lib$ v


knudfl 03-24-2011 12:31 AM

/usr/local/lib/libgcc_s.so.1 : Those gcc-4.1.2 files in /usr/local/lib/ :

You will have to move them away or delete them :
None of those are required. Are from your manual install of gcc-4.1.2.
May be the 'gcc' etc. in /usr/local/bin/ is disturbing too :
Delete or rename ( to gcc412 etc.)

It is still a mystery, why 'apt-get' looks in /usr/local/.
But then again : Not a location ever used for system files !

The system libgcc_s.so.1 is /lib/libgcc_s.so.1 ,
and I hope you still have it present.

..


All times are GMT -5. The time now is 10:59 PM.