未能链接到模块“rlm_python”:rlm_python.so(Failed to link t

2019-09-28 03:52发布

我试图创建的freeradius 3.0.8蟒蛇认证。 我跟着这个例子 。 但是,当我试图使用命令启动的freeradius在调试模式radiusd -X它显示了以下错误。

/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模块是不存在的。 我怎么可以添加模块? 我的Python模块内部/raddb/mods-available/如下。

  python {
  module = example

  mod_authorize = ${.module}
  func_authorize = authorize
}

感谢所有帮助。

Answer 1:

rlm_python是不依赖于分布总是包装。

基本构建指令可以在这里找到: http://wiki.freeradius.org/building/Home

您还需要安装在系统上的蟒蛇-dev /目录中的python-devel包。 如果蟒蛇还是不工作,你可能需要通过将其配置如手动指定路径蟒蛇二进制./configure --with-rlm-python-bin=/usr/bin/python2.7

如果你只是婉验证配置脚本拿起蟒蛇cd src/modules/rlm_python; ./configure cd src/modules/rlm_python; ./configure

在我的系统(MacOS的10.11.6)时,蟒蛇发现输出是:

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本身获得的编译和链接标志。



文章来源: Failed to link to module 'rlm_python': rlm_python.so
标签: freeradius