Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
checking tap-windows.h presence... no
checking for tap-windows.h... no
checking whether TUNSETPERSIST is declared... yes
checking for setcon in -lselinux... yes
checking for pam_start in -lpam... no
checking for OPENSSL_CRYPTO... yes
checking for OPENSSL_SSL... yes
checking for EVP_CIPHER_CTX_set_key_length... yes
checking for ENGINE_load_builtin_engines... yes
checking for ENGINE_register_all_complete... yes
checking for ENGINE_cleanup... yes
checking for ssl_init in -lpolarssl... no
checking for aes_crypt_cbc in -lpolarssl... no
checking for lzo1x_1_15_compress in -llzo2... no
checking for lzo1x_1_15_compress in -llzo... no
checking for PKCS11_HELPER... no
checking git checkout... yes
configure: error: libpam required but missing
[mirror@innov openvpn]$ ./configure --help | grep libpam
  --enable-pam-dlopen     dlopen libpam [default=no]
              C compiler flags for libpam
  LIBPAM_LIBS linker flags for libpam
[mirror@xxx openvpn]$ ./configure --prefix=/home/mirror/build/ins/ins_vpn --disable-lzo 

error: libpam required but missing

I just have no privilege to install the package named libpam, so can I build libpam and install it in home directory, then build openvpn based on it?

share|improve this question

Yes, of course you can compile stuff as a regular user and point the configure script to it. Run configure --help and you'll probably see where it talks about setting environment variables like LIBPAM_LIBS and LIBPAM_CFLAGS. Set these manually to the location where the shared libraries (.so files) and headers (.h files) for a compiled libpam are.

I would advise that you set up a "local prefix" where openvpn and all of its dependencies can be aggregated. Think of this prefix as your own /usr directory.

Looks like from your setup that you're already setting --prefix to /home/mirror/build/ins/ins_vpn, so then /home/mirror/build/ins/ins_vpn/include would be the value to set for the environment variable LIBPAM_CFLAGS and /home/mirror/build/ins/ins_vpn/lib would be the value to set for the environment variable LIBPAM_LIBS. Of course, the environment variable names may vary depending on what configure --help says. So run it and read it.

You could also set PKG_CONFIG_PATH environment variable to /home/mirror/build/ins/ins_vpn/lib/pkg-config and the libpam make install step should push libpam.pc into that directory when installing (if you configure it with --prefix=/home/mirror/build/ins/ins_vpn). By setting PKG_CONFIG_PATH, you are instructing the pkg-config utility to look in that directory for .pc files, which contain data about the compilation and linking flags for programs. Many standard libraries use pkg-config and autoconfig, so you should be able to repeat these steps for any other packages.

Obtaining a proper version of libpam sources is probably just a matter of downloading the source rpm and unpacking the sources, or just figure out which version of libpam upstream your distro uses and grab that version (or a later version will probably work too).

Note that since you don't have root access on the box, you probably can't manipulate tun or tap devices (unless the sysadmin has given you privileges), so you probably won't be able to create a useful VPN tunnel without root anyway, even if you compile openvpn :)

share|improve this answer
seems libpam is in the kernel, so how to build it and install it as an ordinary user? – hugemeow Sep 28 '12 at 9:53

I was trying to install OpenVPN 2.3.0 via a ./configure command as root and I was getting the same error about the libpam required but missing. I installed the package libpam0g-dev and ran the ./configure again successfully.

I know you said you don't have root, but if you can install that package, it will probably let you finish the ./configure you're trying to do.

share|improve this answer

yum install gcc make rpm-build autoconf.noarch zlib-devel pam-devel openssl-devel -y

This will resolve all the dependencies

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.