undefined symbol: lame_encode_buffer_interleaved_int
I use a Debian unstable installation as my daily driver. That does sometimes come with pains when doing apt-get upgrade
. Like today. After upgrading and rebooting, suddenly (almost) everything that had to do with sound was broken. Pulseaudio wasn’t working, alsamixer wouldn’t start, Steam worked, but only after I removed the OS’s libsndfile1:i386
and libmp3lame0:i386
. The error I got from starting these applications in a shell always revolved around this:
/lib/x86_64-linux-gnu/libsndfile.so.1: undefined symbol: lame_encode_buffer_interleaved_int
libsndfile1
was refering to some function that it expected in libmp3lame0
, but could not find it. And, sure enough, looking at the shared library file for lame with nm -gD /lib/x86_64-linux-gnu/libmp3lame.so.0
, that symbol was not there. Someone else had the same problem, but their solution did not seem to apply to me - libmp3lame0
and libsndfile1
were installed and apt-get --reinstall install libmp3lame0 libsndfile1
also did nothing.
On a whim, I downloaded the latest versions of those packets (--reinstall
apparently does not do that, they were not in /var/cache/apt/archives
- how does that work?) and installed them with dpkg -i
.
And lo and behold, what do I get? dpkg
warns me that it is “downgrading” libmp3lame0
from 3.99.5
to 3.100-4
.
So there, problem solved. I did not have the latest version of libmp3lame0
, because dpkg
/apt
for some reason thought my old version was newer than what it found in the repos.
Update 2023-11-21: As a reader kindly points out, the root cause of this was that I still had old versions of Christian Marillat’s debian-multimedia packages installed. These came with a prefix of 1:
in the version number. For what I originally wrote is inaccurate - the version number was not 3.99.5, it was 1:3.99.5, which is strictly higher than any version number without a prefix.
Another useful hint that I failed to give was that you do not manually need to download the packages. You can more conveniently install a specific version with apt-get install libmp3lame0=<version>
(find out what versions are currently available with apt-cache show libmp3lame0
or apt-cache policy libmp3lame0
).