Matlab R2017b + Slackware 14.2 = libpam.so.0 missing

Installing newer versions of Matlab on not-PAM-ified linux requires supplying libpam.so.0 somewhere.

The normal error you will get without Linux-PAM is:

/usr/local/MATLAB/R2017b/bin/glnxa64/MATLAB: error while loading shared libraries: libpam.so.0: cannot open shared object file: No such file or directory

In a Matlab-only install (without Simulink or pretty much anything else) I so far counted it being used 338 time in different .so libs as a dependency (that DOES NOT MEAN anything is actually being used from it). So far supplying a dummy libpam.so.0 seems to do a trick:

One method (as proposed in a topic https://www.linuxquestions.org/questions/slackware-14/libpam-so-0-a-4175613203/page2.html by drumz) is to:
1. grab https://github.com/Dlackware/pam
2. build the packages
3. extract libpam.so.XX from it, where XX is the current version
4. copy libpam.so.XX to your Matlab bin/glnxa64 directory, in my case: /usr/local/MATLAB/R2017b/bin/glnxa64
5. go to it: cd /usr/local/MATLAB/R2017b/bin/glnxa64
6. make a link: ln -s libpam.so.XX libpam.so.0

Second method, without compilation:
1. grab a ready-made package for linux-pam, for example: https://slackware.pkgs.org/14.2/slackpack-x86_64/linux-pam-1.3.0-x86_64-1gds.txz.html
(direct link: http://ftp.sotirov-bg.net/pub/contrib/slackware/packages/slackware64-14.2//linux-pam-1.3.0-x86_64-1gds.txz
2. extract libpam.so.XX from it, in this precise case: libpam.so.0.84.2:
tar -xvJf linux-pam-1.3.0-x86_64-1gds.txz usr/lib64/libpam.so.0.84.2 –strip=2
(J to extract from .xz file, –strip=2 to get rid of usr/lib64 in front)
3. cp libpam.so.0.84.2
4. cd /usr/local/MATLAB/R2017b/bin/glnxa64
5. ln -s libpam.so.0.84.2 libpam.so.0

(Yeah, I know this is not new, but I need it here on the barelywalking in case I umm… like… forget. Happens more often than you think)

2 comments

Comments are closed.