For days I have been seeing this error whenever I go to update software on my computer via
ldconfig: /usr/lib/libstdc++.so.6.0.18-gdb.py is not an ELF file - it has the wrong magic bytes at the start.
From the file extension it is obvious that the file is not meant to be an ELF file. I use Ubuntu 13.04 and have had no problems after just deleting the file. So if you run into the problem on similar Debian-based systems then you ought to be able to safely delete the file. I just wanted to report that the approach has worked for me since I did not find many posts online about people successfully dealing with the issue, which is ultimately caused by a bug that the GCC team is aware of.