在rshd.c源代码中缺少pam_appl.h和pam_misc.h

dev*_*sda 9 c linux rsh centos pam

我正在研究centOS 5.5操作系统.

它显示缺少/security/pam_appl.h和/security/misc.h文件的错误.

实际上我的rshd.c没有加载PAM模块,可能是通过放置这个库,它帮助我工作我的rshd罚款.这就是我发布这个问题的原因.

错误:-

rshd.c:90:31: error: security/pam_appl.h: No such file or directory
rshd.c:91:31: error: security/pam_misc.h: No such file or directory
Run Code Online (Sandbox Code Playgroud)

我搜索了很多但没有获得任何有用的rpm来提供这些文件.

有些链接在这里.但不适合centOS.

帮我.告诉我如何克服这个问题.

编辑没有1

你的第三个链接似乎很有用 当我尝试安装pam-devel时,它会显示一些错误.

我跑的时候

./configure --prefix=/usr \
            --sysconfdir=/etc \
            --docdir=/usr/share/doc/Linux-PAM-1.1.6 \
            --disable-nis &&
make
Run Code Online (Sandbox Code Playgroud)

它检查一些变量,然后它生成目标文件,但最后显示,

make[3]: *** [pam_xauth.lo] Error 1
make[3]: Leaving directory `~/Linux-PAM-1.1.6/modules/pam_xauth'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `~/Linux-PAM-1.1.6/modules'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `~/Linux-PAM-1.1.6'
make: *** [all] Error 2
Run Code Online (Sandbox Code Playgroud)

编辑第2号

当我按照你的命令时,它会在最后显示错误.

我跑的时候出现了这个错误 make && make install

pam_xauth.c:64:27: error: selinux/label.h: No such file or directory
pam_xauth.c: In function âpam_sm_open_sessionâ:
pam_xauth.c:616: error: âSELABEL_CTX_FILEâ undeclared (first use in this function)
pam_xauth.c:616: error: (Each undeclared identifier is reported only once
pam_xauth.c:616: error: for each function it appears in.)
pam_xauth.c:616: warning: initialization makes pointer from integer without a cast
make[3]: *** [pam_xauth.lo] Error 1
make[3]: Leaving directory `/root/Linux-PAM-1.1.6/modules/pam_xauth'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/Linux-PAM-1.1.6/modules'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/Linux-PAM-1.1.6'
make: *** [all] Error 2
Run Code Online (Sandbox Code Playgroud)

Mik*_*ike 14

我目前没有CentOS,但似乎这是一个常见的问题.有关信息,请参阅此处,建议您安装pam-devel,这样您就不必从源代码构建:

yum install pam-devel
Run Code Online (Sandbox Code Playgroud)

似乎每当我找到问题与您的问题相同的网站时,修复就是安装它.我现在正在下载CentOS 5.5以试一试,但你刚试过运行那个命令吗?

如果你确实安装了它,但它仍然没有找到头文件,我试试看:

cd /
sudo find . -name "pam_appl.h"
sudo find . -name "pam_misc.h"
Run Code Online (Sandbox Code Playgroud)

它们可能已安装且未进入标准包含路径,或未进入security/目录,在这种情况下,您需要移动它们或更改标头包含在代码中的方式.

请注意sudo您必须输入密码的命令.

  • 而对于Debian和衍生品,那将是"sudo apt-get install libpam0g-dev" (3认同)

小智 8

如果有人正在寻找debian / ubuntu,请尝试这个 sudo apt-get install libpam0g-dev