Yesterday I ran in to a problem compiling a program on a remote linux server I have. It’s fairly old, and there aren’t a lot of newer packages available for it. Two years ago I downloaded the latest version of the GCC Compiler because I needed some newer features that weren’t available in the ancient bundled compiler. I made some changes on the system and had to update some libraries and change some symbolic links.
Well, fast forward two years to yesterday: after running ldconfig, perhaps for the first time since then, I found I could no longer run any program I compiled. I kept getting a weird error about /lib/libgcc_s.so not being the right GCC version. When I went to that directory, I found a readme file called libgcc_s.so.README. When I read it, it was a note I wrote to myself two years ago about the change I had made and that this would probably break something. Funny thing is I don’t even remember writing the note.
Anyway, I updated my /etc/ld.so.conf file (it didn’t have /usr/local/lib in it), which was the root of the problem, re-ran ldconfig and everything worked great.