amishmm / php-pam

This extension provides PAM (Pluggable Authentication Modules) integration for PHP
Other
10 stars 5 forks source link

installation on Ubuntu 20.04 fails #8

Closed mi-hol closed 3 years ago

mi-hol commented 3 years ago

Hi Amish, I've tried to install 2.2.3 on Ubuntu 20.04 as root but I get below error. Any hint how I could fix this issue as I'm new to Ubuntu? pear install pecl/PAM

downloading pam-2.2.3.tgz ...
Starting to download pam-2.2.3.tgz (9,422 bytes)
.....done: 9,422 bytes
6 source files, building
running: phpize
Configuring for:
PHP Api Version:         20190902
Zend Module Api No:      20190902
Zend Extension Api No:   320190902
building in /tmp/pear/temp/pear-build-rootUcntpv/pam-2.2.3
running: /tmp/pear/temp/pam/configure --with-php-config=/usr/bin/php-config
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib
checking for PHP extension directory... /usr/lib/php/20190902
checking for PHP installed headers prefix... /usr/include/php/20190902
checking if debug is enabled... no
checking if zts is enabled... no
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking PHP version... 7.4.3
checking for PAM support... yes, shared
checking for PAM files in default path... not found
configure: error: install the PAM library or use --with-pam=DIR to specify the location
ERROR: `/tmp/pear/temp/pam/configure --with-php-config=/usr/bin/php-config' failed
amishmm commented 3 years ago

Last two lines tells the problem. Install PAM library first or specify the right location.

mi-hol commented 3 years ago

Thanks I assumed wrongly that PAM library was already installed. sudo apt-get install libpam0g-dev fixed the issue