Showing results for 
Search instead for 
Did you mean: 

Re: PAM library issues.....


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 -rpath /web/src/php/php-4.1.2/libs -avoid-version stub.lo Zend
/ sapi/apache/ main/ regex/ ext/ftp/lib ext/ldap/ ext/mysql/ ext/pcre/ ext/posix/l ext/session/ ext/standard/ ext/xml/libxml.
la TSRM/ -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]: *** [] 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/ /lib/ /lib/
/lib/* /lib/* /lib/*

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

Where could I have gone wrong?

Re: PAM library issues.....

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

Re: PAM library issues.....

$ sudo ldconfig -vn /lib|grep pam -> -> ->

I had same problem and had to force a reinstall of pam and pam-devel on the server, now it works.