私はUbuntu 10.04、Python 2.6.5を使用していますが、pyLuceneのインストールに問題があります。
これが私がこれまでに行ったことであり、これらのパッケージをインストールしました-
sudo apt-get install ant
sudo apt-get install sun-java6-jdk
sudo update-java-alternatives -s java-1.5.0-sun
sudo apt-get install gcc
sudo apt-get install g++
sudo apt-get install gcj
sudo apt-get install python-dev
その後、http://www.apache.org/dyn/closer.cgi/lucene/pylucene/ から pyLucene のソース コードを取得しました。バージョン pylucene-3.0.1-1 を取得しました。
解凍した。JCC を最初に構築する必要があるため。JCCディレクトリに移動してから入力しましたpython setup.py install
。一部の setuptools パッチに関するエラーが発生しました。それは私にこれをするように言った -
sudo patch -d /usr/lib/python2.6/dist-packages -Nup0 < /home/code/python/lucene/pylucene-3.0.1-1/jcc/jcc/patches/patch.43.0.6c11
そして私はしました。しかし、私は端末でこれを取得しました-
patching file setuptools/extension.py
patching file setuptools/command/build_ext.py
Hunk #1 FAILED at 85.
Hunk #2 succeeded at 177 (offset 7 lines).
Hunk #3 succeeded at 259 (offset 7 lines).
1 out of 3 hunks FAILED -- saving rejects to file setuptools/command/build_ext.py.rej
今、私のビルドは失敗します-つまり、私がsudo python setup.py build
得るとき-
...
error: command 'gcc' failed with exit status 1