我试图为freeradius 3.0.8创建一个python身份验证。我跟踪了this example。但是当我试图在调试模式下使用radiusd -X命令启动freeradius时,它显示了以下错误。
/usr/local/etc/raddb/mods-enabled/python[9]: Failed to link to module 'rlm_python': rlm_python.so: cannot open shared object file: No such file or directory我查看了/usr/local/lib/文件夹,发现rlm_python模块不在那里。如何添加该模块?我在/raddb/mods-available/中的python模块如下所示。
python {
module = example
mod_authorize = ${.module}
func_authorize = authorize
}感谢任何人的帮助。
发布于 2017-07-28 22:13:21
根据发行版的不同,rlm_python并不总是打包。
基本的构建说明可以在这里找到:http://wiki.freeradius.org/building/Home
您还需要在系统上安装python-dev/python-devel包。如果python仍然不起作用,您可能需要手动指定python二进制文件的路径,方法是将其传递给configure,例如./configure --with-rlm-python-bin=/usr/bin/python2.7。
如果您只是想验证配置脚本是否选择了python cd src/modules/rlm_python; ./configure
在我的系统(macOS 10.11.6)上,找到python时的输出是:
checking for gcc... /usr/local/opt/llvm/bin/clang
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 /usr/local/opt/llvm/bin/clang accepts -g... yes
checking for /usr/local/opt/llvm/bin/clang option to accept ISO C89... none needed
checking how to run the C preprocessor... /usr/local/opt/llvm/bin/clang -E
checking for python2.7... python2.7
configure: Python sys.prefix "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7"
configure: Python sys.exec_prefix "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7"
configure: Python sys.version "2.7"
configure: Python local_mod_libs ""
configure: Python base_mod_libs ""
configure: Python other_libs "-u _PyMac_Error $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK) -ldl -framework CoreFoundation"
checking for Python.h in /usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/include/python2.7/... yes
checking for Py_Initialize in -lpython2.7 in /usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config... yes
configure: creating ./config.status
config.status: creating all.mk一旦配置脚本找到了python二进制文件,它通常都会“正常工作”,因为它可以从python本身获得编译和链接标志。
https://stackoverflow.com/questions/45371531
复制相似问题