LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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: Debian, RHEL, SLES, OOS
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,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
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: Debian, RHEL, SLES, OOS
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:44 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration