2017-07-28 11 views
0

freeradius 3.0.8用のpython認証を作成しようとしていました。私はthis exampleに続いた。しかし、私がコマンドradiusd -Xを使ってデバッグモードでfreeradiusを起動しようとすると、次のエラーが表示されます。モジュール 'rlm_python'へのリンクに失敗しました:rlm_python.so

/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/folderを見て、rlm_pythonモジュールが存在しないことを発見しました。どのようにそのモジュールを追加できますか?私のPythonモジュール内の/raddb/mods-available/は以下の通りです。

python { 
    module = example 

    mod_authorize = ${.module} 
    func_authorize = authorize 
} 

ありがとうございました。

答えて

0

rlm_pythonは、ディストリビューションによっては常にパッケージ化されているとは限りません。

基本的なビルド手順がここで見つけることができます:http://wiki.freeradius.org/building/Home

また、あなたのシステム上のpython-devの/のpython-develのパッケージをインストールしている必要があります。 Pythonがまだ動作しない場合は、Pythonバイナリへのパスを手動で設定するために渡すことによって、手動でパスを指定する必要があります。 ./configure --with-rlm-python-bin=/usr/bin/python2.7

あなただけのconfigureスクリプトは、私のシステム(MacOSの10.11.6)でPython cd src/modules/rlm_python; ./configure

を拾ったことを確認するために弱々しい場合の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 

configureスクリプトたら、 Pythonバイナリを見つけると、Python自体からコンパイルとリンクのフラグを得ることができるので、一般的にはすべて「うまくいく」でしょう。

+0

rlm_pythonをパッケージ化するために正確に何をする必要がありますか? – Channa

+0

あなたはどのパッケージシステムを使用していますか? –

+0

私はfreeradiusを構築するために以下のコマンドを使用しています './configure \t make'、それはあなたが求めているものではない場合は申し訳ありません。私はfreeradiusに新しいです – Channa

関連する問題