waywardgeek / infnoise

The world's easiest TRNG to get right
Creative Commons Zero v1.0 Universal
723 stars 99 forks source link

Ubuntu 20.04 (Focal) Error while loading shared libraries: libftdi1.so.2 #104

Open naftulikay opened 10 months ago

naftulikay commented 10 months ago

After installing on Ubuntu 20.04 (Focal, amd64, elementary OS 6.1) using the apt repository, I saw the following message in the journal for the unit:

/usr/sbin/infnoise: error while loading shared libraries: libftdi1.so.2: cannot open shared object file: No such file or directory

By editing /etc/infnoise.conf and adding an LD_PRELOAD, it works:

LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libftdi1.so.2

The service subsequently starts as expected. I'm not sure why this is the case, because the directory is indeed included in /etc/ld.so.conf.d/x86_64-linux-gnu:

# Multiarch support
/usr/local/lib/x86_64-linux-gnu
/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu

I then removed the LD_PRELOAD line, ran sudo ldconfig, and the service was subsequently able to start. Perhaps all that needs to happen is to run ldconfig as root after the installation of libftdi or infnoise.