Skip to content Skip to sidebar Skip to footer

Installing Stanford Parser's Python Interface: Error: Command 'gcc' Failed With Exit Status 1 Rake Aborted

I'd like to install the stanford parser's python interface. http://projects.csail.mit.edu/spatial/Stanford_Parser When running rake setup to install jpype first, I keep ge In file

Solution 1:

The error messages says you are missing jni.h. You can use the search tool at http://packages.ubuntu.com to find which package provides the missing file:

For the most recent version of Ubuntu, Quantal (12.10), these packages provide the jni.h:

File    Packages
/usr/lib/gcc-snapshot/lib/gcc/i686-linux-gnu/4.8.0/include/jni.h    gcc-snapshot
/usr/lib/gcc/i686-linux-gnu/4.6/include/jni.h   gcj-4.6-jdk
/usr/lib/gcc/i686-linux-gnu/4.7/include/jni.h   gcj-4.7-jdk
/usr/lib/jvm/java-1.5.0-gcj-4.6/include/jni.h   gcj-4.6-jdk
/usr/lib/jvm/java-1.5.0-gcj-4.7/include/jni.h   gcj-4.7-jdk
/usr/lib/jvm/java-1.5.0-gcj-4.8-snap/include/jni.h  gcc-snapshot
/usr/lib/jvm/java-6-openjdk-i386/include/jni.h  openjdk-6-jdk
/usr/lib/jvm/java-7-openjdk-i386/include/jni.h  openjdk-7-jdk

Either openjdk or gcj will do; this page may help clarify the difference.

Solution 2:

jni.h is the Java Native Interface header, so you will need to make sure you have Java installed. For Ubuntu there is a openjdk-6-jdk package which I've confirmed has the require file available.

Post a Comment for "Installing Stanford Parser's Python Interface: Error: Command 'gcc' Failed With Exit Status 1 Rake Aborted"