FedoraThis forum is for the discussion of the Fedora Project.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I used apt to get the new kernel (2.6.14-1.1644) and gcc was updated to 4.0.2-8 at the same time.
However, I needed to recompile a kernel driver and I found a warning:
>> Your kernel was built with "gcc" version "4.0.1", while you are trying to use
>> "/usr/bin/gcc" version "4.0.2".
As expected, the driver didn't work.
So, what I did was to try to rollback the update with the command:
>> rpm -Uvh /var/cache/apt/archives/*4.0.1-4* --force
And the following packages were re-installed:
cpp_4.0.1-4.fc4_i386.rpm libgcj_4.0.1-4.fc4_i386.rpm
gcc_4.0.1-4.fc4_i386.rpm libgcj-devel_4.0.1-4.fc4_i386.rpm
gcc-c++_4.0.1-4.fc4_i386.rpm libgfortran_4.0.1-4.fc4_i386.rpm
gcc-gfortran_4.0.1-4.fc4_i386.rpm libstdc++_4.0.1-4.fc4_i386.rpm
gcc-java_4.0.1-4.fc4_i386.rpm libstdc++-devel_4.0.1-4.fc4_i386.rpm
libgcc_4.0.1-4.fc4_i386.rpm
I successfully compiled the kernel module, however when I try to run applications this error shows up and there's nothing I can do:
>> rpm: error while loading shared libraries: libstdc++.so.6:
>> cannot open shared object file: No such file or directory
It pressents with the rpm command so I can't use it to update gcc to use the correct version.
Now I understand, it was a really bad idea to try the rollback of gcc and I deserve the punishment of reinstalling the entire OS, not such a punishment really since my home directory is in an independent partition and the same goes to apt archives, but it will take a couple of hours.
Is there any way to correct this problem without a full reinstallation of the OS?.
Try to determine whether this library file exists or not. I'm betting that it does, because everything uses it, yet the error message indicates that it doesn't exist at all. If may be a symlink to libstd+++.so. If it does exist, then try running the "ldconfig" command as root. Sometimes this will fix up the library paths, in the case when it wasn't done successfully after using the RPM command.
On the other hand, I think that it was the "--force" option which did you in. You may have ignored other packages which depend on packages that you had replaced.
Good Luck. I'm not couragous enough to attempt to update gcc on my system without upgrading the distro.
The file libstdc++.so.6.0.7 wasn't there so I just extracted the missing file from the latest RPM and it solved everything, it was a little bit difficult to extract the file from the rpm but it worked.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.