1825052 Members
3554 Online
109679 Solutions
New Discussion юеВ

PAM library issues.....

 
Brian Ham
Advisor

PAM library issues.....

I have been running into a shared library error that has been stumping me. For some reason on our RedHat Linux box the PAM shared library is not being recognized. The
compilation of PHP stops in the following manner:

gmake[1]: Entering directory `/web/src/php/php-4.1.2'
/bin/sh /web/src/php/php-4.1.2/libtool --silent --mode=link gcc -I. -I/web/src/
php/php-4.1.2/ -I/web/src/php/php-4.1.2/main -I/web/src/php/php-4.1.2 -I/web/ser
ver/apache/include -I/web/src/php/php-4.1.2/Zend -I/web/src/php/php-4.1.2/ext/my
sql/libmysql -I/web/src/php/php-4.1.2/ext/xml/expat -DLINUX=22 -DNO_DBM_REWRITE
MAP -DUSE_HSREGEX -DUSE_EXPAT -I/web/src/php/php-4.1.2/TSRM -g -O2 -prefer-pic
-o libphp4.la -rpath /web/src/php/php-4.1.2/libs -avoid-version stub.lo Zend
/libZend.la sapi/apache/libsapi.la main/libmain.la regex/libregex.la ext/ftp/lib
ftp.la ext/ldap/libldap.la ext/mysql/libmysql.la ext/pcre/libpcre.la ext/posix/l
ibposix.la ext/session/libsession.la ext/standard/libstandard.la ext/xml/libxml.
la TSRM/libtsrm.la -lpam -ldl -lldap -llber -lcrypt -lresolv -lm -ldl -lnsl -lre
solv -lcrypt
/usr/bin/ld: cannot find -lpam
collect2: ld returned 1 exit status
gmake[1]: *** [libphp4.la] Error 1

To simplify the problem I wrote a baby C program that just prints out a line, and compiled it using the same PAM library. The same error appears:

$ gcc bar.c -o bar -lpam
/usr/bin/ld: cannot find -lpam
collect2: ld returned 1 exit status

Surprisingly, the PAM libraries are fully in place:

$ ls /lib/lib*pam*
/lib/libpamc.so.0@ /lib/libpam_misc.so.0@ /lib/libpam.so.0@
/lib/libpamc.so.0.75* /lib/libpam_misc.so.0.75* /lib/libpam.so.0.75*

And I did a "ldconfig -n /lib" as root to make sure the shared library cache was updated.

Where could I have gone wrong?
2 REPLIES 2
Brian Ham
Advisor

Re: PAM library issues.....

By copyiing the shared library and replacing these files, I was able to repair this issue.
AskApache
New Member

Re: PAM library issues.....

$ sudo ldconfig -vn /lib|grep pam
libpam.so.0 -> libpam.so.0.81.5
libpamc.so.0 -> libpamc.so.0.81.0
libpam_misc.so.0 -> libpam_misc.so.0.81.2

I had same problem and had to force a reinstall of pam and pam-devel on the http://www.askapache.com/ server, now it works.