构建 pam_sasl 模块时配置失败

Configure fail when build the pam_sasl module

我从 pam_sasl 下载了源代码 http://sourceforge.net/projects/pam-sasl/?source=typ_redirect

发出 ./configure 命令后,它 returns 配置:错误:找不到 sasl2

linux-xbx0:~/pam_sasl-0.1.2 # ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
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 gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for xsltproc... /usr/bin/xsltproc
checking for sasl_checkpass in -lsasl2... no
configure: error: sasl2 not found

linux-xbx0:~/pam_sasl-0.1.2 # rpm -ql libsasl2-3-2.1.26-7.1.x86_64
/usr/lib64/libsasl2.so.3
/usr/lib64/libsasl2.so.3.0.0

linux-xbx0:~/pam_sasl-0.1.2 # echo $LD_LIBRARY_PATH
:/usr/lib:/usr/lib64:/usr/lib:/usr/lib64:/usr/lib/sasl2/:/usr/lib64/sasl2

linux-xbx0:~/pam_sasl-0.1.2 # rpm -qa | grep sasl
cyrus-sasl-sqlauxprop-32bit-2.1.26-7.1.x86_64
cyrus-sasl-gssapi-2.1.26-7.1.x86_64
libsasl2-3-2.1.26-7.1.x86_64
libsasl2-3-32bit-2.1.26-7.1.x86_64
cyrus-sasl-saslauthd-2.1.26-7.1.x86_64
cyrus-sasl-crammd5-2.1.26-7.1.x86_64
cyrus-sasl-otp-2.1.26-7.1.x86_64
cyrus-sasl-32bit-2.1.26-7.1.x86_64
cyrus-sasl-digestmd5-2.1.26-7.1.x86_64
cyrus-sasl-gssapi-32bit-2.1.26-7.1.x86_64
cyrus-sasl-plain-32bit-2.1.26-7.1.x86_64
cyrus-sasl-sqlauxprop-2.1.26-7.1.x86_64
cyrus-sasl-plain-2.1.26-7.1.x86_64
cyrus-sasl-otp-32bit-2.1.26-7.1.x86_64
cyrus-sasl-2.1.26-7.1.x86_64
cyrus-sasl-crammd5-32bit-2.1.26-7.1.x86_64

linux-xbx0:~/pam_sasl-0.1.2 # cat /etc/*release SUSE Linux 企业服务器 12 (x86_64) 版本 = 12 补丁级别 = 1

与"normal" 包相对应的开发包通常在其名称后附加-devel。由于 SASL2 库是由软件包 cyrus-sasl 提供的,您现在正在寻找软件包 cyrus-sasl-devel

由于您使用的是 openSUSE 发行版衍生版,这里是 SLES,您可以使用提供的软件管理实用程序 YaST 来安装该软件包,或者使用命令行工具 zypper 如果已安装,这在使用中要快得多。所以你有这两个选择:

  1. 启动YaST控制中心,选择"Software Management"模块,等待加载。然后搜索字符串 "sasl" 并从匹配列表中选择包。

  2. zypper install cyrus-sasl-devel