Unable to open shared libasound library, despite file existing

In attempting to revisit my childhood and play Sid Meier's Alpha Centauri again on Linux (something which I accomplished successfully a few years back), I've run into a stubborn error. The Loki port installs fine and plays without crashes or visual problems using the libraries and loader scripts provided, but plays without sound. Loading from command line, the game throws the following errors:

ALSA lib conf.c:3314:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM default

I'm on Mint 17 (Ubuntu 14.04) and thus runnning PulseAudio for sound. What I'd like to know are 1) what is the source of this error and 2) how can it be fixed?

The weirdest thing is that just 24 hours ago the game was running fine with sound; only on rebooting my system did game sound stop working (sound from other applications works just fine), and I can't for the life of me reproduce any steps during or after installation that might have caused this.

I have osspd, 32-bit libasound2 libraries, and 64-bit libasound2 libraries installed, and libasound_module_conf_pulse.so does indeed exist under both /usr/lib/i386-linux-gnu/alsa-lib and /usr/lib/x_86_64-linux-gnu/alsa-lib. The script I used to load the game, as well as when sound worked, is given below:

#!/bin/bash
export LD_LIBRARY_PATH=/opt/AlphaCentauri/Loki_Compat
$LD_LIBRARY_PATH/ld-linux.so.2 /opt/AlphaCentauri/smacx.dynamic

Without the compatible libraries in Loki_Compat, the game doesn't run at all. I've tried adding the full paths for libasound_module_conf_pulse.so to the LD_LIBRARY_PATH as well as LD_PRELOAD, I've tried reinstalling the game and the associated libraries, and I've even tried symlinking the difficult library in Loki_Compat to make sure it's being found, to no avail.

Although I've seen various mentions of Cannot open shared library ... errors of this type (mostly among different programs) via Google, I've found no satisfactory solutions so far. I'd be tempted to chalk this up to being an unsolvable issue (due to something breaking between now and when I last played the game), except that sound was, by some miracle, working out of the box when I installed the game over the weekend.


I had a similar problem on Ubuntu 14.04 64bit (perhaps, it happened after I installed manually a specific version of alsa-base package, because it was somehow required when I tried to build Java Hotspot and JVM from source on that host).

I also checked "strace" output and installed only one symlink /usr/lib/x86_64-linux-gnu/libasound_module_conf_pulse.so that fixed the problem for me. Probably, you installed your symlinks in a wrong place. My exact commands were:

cd /usr/lib/x86_64-linux-gnu/
sudo ln -s alsa-lib/libasound_module_conf_pulse.so libasound_module_conf_pulse.so

I also had a problem with libasound_module_conf_pulse.so while using pygame.midi

sudo apt install --reinstall alsa-utils alsa-tools

solved the issue. Hope it helps someone. I'm using Debian Buster.


First create the called environment given in the Error:

In my case: ALSA lib conf.c:3725:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so (/lib/i386-linux-gnu/alsa-lib/libasound_module_conf_pulse*.so: cannot open shared object file: No such file or directory) ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM default

Run these commands:

sudo mkdir /usr/lib/i386-linux-gnu/alsa-lib/
cd /usr/lib/i386-linux-gnu/alsa-lib/
sudo dpkg --add-architecture i386
sudo apt-get install libasound2-plugins:i386