OS: Ubuntu Server 18.04.1 LTS
Samba 4.9.0
さらっぴんのUbuntu Server 18.04.1 LTSにSamba 4.9.0をソースからインストールしようと試みたところ、Ubuntu Server 12.04の頃には見られなかったエラーの為にconfigureの処理を進めることができなかったから記録しておくものである。まずはソースをダウンロードして展開。
$ wget -c https://download.samba.org/pub/samba/stable/samba-4.9.0.tar.gz $ wget -c https://download.samba.org/pub/samba/stable/samba-4.9.0.tar.asc $ gunzip samba-4.9.0.tar.gz $ gpg --recv-key 6F33915B6568B7EA $ gpg --verify samba-4.9.0.tar.asc $ tar xvf samba-4.9.0.tar $ cd samba-4.9.0/
そうしてconfigureを実行するとこういう有様であった。python: not found
というエラーメッセージを頂戴するけれどもpythonはあるからこはいかにと思う。
$ ./configure ./configure: 16: ./configure: python: not found $ which python /usr/bin/python3
configureスクリプトの16行目に手掛かりがあるようであるから内容を見つめると変数${PYTHON}
がセットされてなければpython
という文字列を納めてpythonコマンドを実行する様子である。
$ cat -n configure (snip) 15 cd . || exit 1 16 ${PYTHON:=python} $WAF configure "$@" || exit 1 17 cd $PREVPATH
python3はあるけれどもpythonは見当たらないから斯様なエラーメッセージになることは判然としたけれども、sudo ln -s /usr/bin/python3 /usr/bin/python
で以って対処しても結局エラーが表示されて先へ進めないのは同様であった。どうやらpython3系は違うようであるから改めてpython2.7をインストールするのが良さそうである。
なおpython2.7のパッケージだけではCould not find the python development headers
というエラーが出てしまうからこの際、libpython2.7-devも併せてインストールしなければならぬ情勢であった。
$ sudo apt install python2.7 libpython2.7-dev $ sudo ln -s /usr/bin/python2.7 /usr/bin/python
これでconfigureスクリプトの処理が恙無く進行してSambaのインストールまで漕ぎ着けることができたのである。
$ ./configure --without-ad-dc --without-acl-support --without-ldap --without-ads --without-pam --without-json-audit --without-libarchive $ make $ sudo make install
参考:
Bug 10028 – Samba Python 3 support