安装pampython1.0.5时出错

2024-09-23 16:21:20 发布

您现在位置:Python中文网/ 问答频道 /正文

当我运行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。在


Tags: frombuildsourcemakeincludeusrhtmldirectory
1条回答
网友
1楼 · 发布于 2024-09-23 16:21:20

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

EL6包:python-pam-1.8.2-2.EL6。无转速(9.7kB)https://drive.google.com/file/d/0B7S255p3kFXNQ1FrM1poTXR5Nmc/view?usp=sharing

下载软件包,然后。。。在

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

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

^{pr2}$

。。。文件build/lib.linux-x86_64-2.6/pam-python.so被创建。在

安装:#python setup.py install。。。安装文本显示已安装的内容。。。帕姆_python.py,帕姆_python.pyc你说

^{3}$

相关问题 更多 >