blah blah
sudo apt-get install python-dev
get the source code,and just :python ez_setup.py
It's annoying to config sun-jdk, we just use open-jdk instead.
java -version
javac -version
you may get this:
$java -version
java version "1.7.0_21"
OpenJDK Runtime Environment (IcedTea 2.3.9) (7u21-2.3.9-1ubuntu1)OpenJDK Server VM (build 23.7-b01, mixed mode)
$javac -version
javac 1.7.0_21
the javac version should be the same with java version.
if you are not sure that your jdk is installed correctly, you can just restore it by apt-get or yum.
cd jcc
and modify the JDK path:
JDK = {
'darwin': JAVAHOME,
'ipod': '/usr/include/gcc',
'linux2': '/usr/lib/jvm/java-7-openjdk-amd64', <---change this path
'sunos5': '/usr/jdk/instances/jdk1.6.0',
'win32': JAVAHOME,
'mingw32': JAVAHOME,
'freebsd7': '/usr/local/diablo-jdk1.6.0'
}
than build and restore:
python setup.py build
sudo python setup.py install
if there's no errors, congratulations! You are close to success.
just:
sudo apt-get install ant
modify the Makefile:
# Linux (Ubuntu 11.10 64-bit, Python 2.7.2, OpenJDK 1.7, setuptools 0.6.16)
# Be sure to also set JDK['linux2'] in jcc's setup.py to the JAVA_HOME value
# used below for ANT (and rebuild jcc after changing it).
PREFIX_PYTHON=/usr
ANT=JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-i386 /usr/bin/ant
PYTHON=$(PREFIX_PYTHON)/bin/python
JCC=$(PYTHON) -m jcc --shared
NUM_FILES=2
now type the exciting command:
make
sudo make install
if no errors occur, you've made it!
get into python and type:
>>import lucene
>>
Ok, that's all if you see the second prompt!