LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 06-05-2010, 01:41 PM   #1
marguelles
LQ Newbie
 
Registered: Sep 2008
Location: Argentina
Distribution: At home Debian 5.04 64bit // At work RHEL 5.4 - SLES 10
Posts: 9

Rep: Reputation: 0
Red face apt-get messed up


Hi guys,

I am currently switching from Windows to GNU/Linux. The bad habit of throw libs into system32 folder made me break the apt-get command.

I copied a library from my DEBIAN Lenny 32bit to my DEBIAN Lenny 64bit.

Code:
# scp root@DEBIAN:/usr/lib/libstdc++.so.6 .
After that, I got the error bellow when running apt-get install ...

Code:
apt-get: error while loading shared libraries: libstdc++.so.6: wrong ELF class: ELFCLASS32
Could anyone help me with this?

I googled this but all the information is out of date or is wrong. However, too many people asked to run this commands. Hope will be useful for you:

Code:
# file /usr/lib/libstdc++.so.6
/usr/lib/libstdc++.so.6: symbolic link to `libstdc++.so.6.0.10'

# file /usr/lib/libstdc++.so.6.0.10
/usr/lib/libstdc++.so.6.0.10: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped

Thanks in advance.

Last edited by marguelles; 06-05-2010 at 04:52 PM. Reason: SOLVED
 
Old 06-05-2010, 03:45 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,108

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
Looks like you learned an important lesson about not messing around with important system files. Anyhow, /usr/lib/libstdc++.so.6 is in the libstdc++6 package. I'd suggest that you locate the .deb file for libstdc++6 on your install media, purge the old package from your system, and simply reinstall it with "dpkg -i" (you might need to add the --force-all option to dpkg). The procedure is roughly described in this article, however as your apt-get is broken you'll need to do everything with dpkg directly instead of using apt-get. Alternatively, you might try just extracting the libstdc++.so.6.0.10 file from the .deb file and copying it over the bad 32 bit version (instructions for extracting files from .deb packages may be found here.

Good luck and in the future please think twice before messing with critical system libraries (at least it wasn't glibc that you overwrote ;-)).
 
1 members found this post helpful.
Old 06-05-2010, 04:50 PM   #3
marguelles
LQ Newbie
 
Registered: Sep 2008
Location: Argentina
Distribution: At home Debian 5.04 64bit // At work RHEL 5.4 - SLES 10
Posts: 9

Original Poster
Rep: Reputation: 0
It was a netinstall. I've just replaced the file like you said and it's working again

Thanks man!
 
Old 11-24-2011, 09:36 AM   #4
kamjad
LQ Newbie
 
Registered: Nov 2011
Posts: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by marguelles View Post
It was a netinstall. I've just replaced the file like you said and it's working again

Thanks man!
hiya

i am facing the same problem, apt-get and synaptic package manager is not responding , could you please describe me what did you do in details, my knowledge is just scratch, so i need little steps to be known, i am using ubuntu 10.04. when i type in root apt-get then i see the following message
apt-get: error while loading shared libraries: libstdc++.so.6: wrong ELF class: ELFCLASS64

also in my case all icons on desktop are disappeared, how ever i can see the desktop items in shell,

many thanks in advance
 
  


Reply

Tags
error


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to prevent apt from deleting packages in /var/cache/apt/archives ? abc.linux Debian 11 11-07-2009 11:46 AM
LXer: Create a Local Ubuntu Repository using Apt-Mirror and Apt-Cacher LXer Syndicated Linux News 0 08-04-2009 10:13 PM
apt pinning /etc/apt/apt.conf parent's_basement Debian 5 10-26-2008 05:50 PM
apt error, messed up after tried installing kernel-source-2.6.8 microsoft/linux Debian 1 06-17-2005 12:38 AM
apt-get update errors since Debian released ( bad /etc/apt/sources.list ?) forgox Debian 10 06-13-2005 12:28 PM


All times are GMT -5. The time now is 10:55 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration