安装pam-python-1.0.5时出错

安装pam-python-1.0.5时出错,python,authentication,pam,Python,Authentication,Pam,当我运行make命令时,我收到以下错误 rm -f html/index.html && ln -s pam_python.html html/index.html make[1]: Leaving directory `/home/vagrant/pam-python-1.0.5/doc' make --directory src make[1]: Entering directory `/home/vagrant/pam-python-1.0.5/src' gcc -O0 -

当我运行
make
命令时,我收到以下错误

rm -f html/index.html && ln -s pam_python.html html/index.html
make[1]: Leaving directory `/home/vagrant/pam-python-1.0.5/doc'
make --directory src
make[1]: Entering directory `/home/vagrant/pam-python-1.0.5/src'
gcc -O0 -Wall -Wextra -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wsign-compare -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Werror -g -o ctest ctest.c -lpam
CFLAGS="-Wall -Wextra -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wsign-compare -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Werror" ./setup.py build
running build
running build_ext
building 'pam_python' extension
creating build
creating build/temp.linux-x86_64-2.6
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -Wall -Wextra -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wsign-compare -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Werror -fPIC -DLIBPYTHON_SO="libpython2.6.so.1.0" -I/usr/include/python2.6 -c pam_python.c -o build/temp.linux-x86_64-2.6/pam_python.o
In file included from /usr/include/python2.6/pyconfig.h:6,
                 from /usr/include/python2.6/Python.h:8,
                 from pam_python.c:36:
/usr/include/python2.6/pyconfig-64.h:1043:1: error: "_XOPEN_SOURCE" redefined
In file included from /usr/include/stdlib.h:25,
                 from /usr/include/security/_pam_macros.h:12,
                 from pam_python.c:32:
/usr/include/features.h:164:1: error: this is the location of the previous definition
error: command 'gcc' failed with exit status 1
我使用的系统是
CentOs 6.7


有没有其他方法可以直接为python安装pam模块,以便它在lib64/security目录中生成
pam_python.so

建议:使用稳定版本=python-pam-1.8.2

EL6包:python-pam-1.8.2-2.EL6.noarch.rpm(9.7kB)

下载软件包,然后

cd Downloads/
# yum install  python-pam-1.8.2-2.el6.noarch.rpm

编辑:关于另一个“模块”=pampython1.0.5:似乎我找到了一个解决方案→

cd pam-python-1.0.5/src/
python setup.py build
。。。并且创建了文件
build/lib.linux-x86_64-2.6/pam python.so

安装:#
python setup.py安装
。。。安装文本显示已安装的内容。。。pam_python.py,pam_python.pyc

/usr/lib64/python2.6/site-packages/pam_python-1.0.5-py2.6-linux-x86_64.egg/pam_python.so


它成功安装了它,但没有在lib目录中创建pam_python.so?它是在哪里创建的?对,pam_Pyon实际上是一个完全不同的野兽,看起来:只提供一个文件→ “1.0.1-src.rpm”(Suse.python setup.py)中的pam_python.so、、在问题中给出了相同的警告。虽然没有exit@user2823667,你有结果吗?(pam_python.so)。。。CentOS 6.7:请运行#
yum更新
。。。你有CentOS 6.8。。。其他建议:#
yum安装gcc-c++
或/和#
yum重新安装gcc-c++