Rollback of gcc failed and rpm is not working
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. |
You're right!, it was a problem with the symlink. :D
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. Thank you very much for your reply. |
All times are GMT -5. The time now is 09:25 PM. |