Installing Stanford Parser Python interface: error: 'gcc' command failed with exit status 1 rake aborted

I would like to install the python interface for the stanford parser.

http://projects.csail.mit.edu/spatial/Stanford_Parser

When running rake setup , to install jpype first, I save ge

In file included from src/native/common/jp_reference.cpp:1:0: src/native/common/include/jpype.h:45:17: schwerwiegender Fehler: jni.h: Datei oder Verzeichnis nicht gefunden Kompilierung beendet. error: command 'gcc' failed with exit status 1 rake aborted! 

The error message is in English-German. It says: severe crash: jni.h: file or directory not found.

When I try to install stanford-parser itself, the same thing happens.

Yes, I have python-dev already installed on my system. I am working on Ubuntu and with python2.7.

0
source share
2 answers

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

For the latest version of Ubuntu, Quantal (12.10), these packages provide 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 be executed; this page can help clarify the difference.

+2
source

jni.h is the header of the Java Native Interface , so you need to make sure you have Java installed. For Ubuntu there is an openjdk-6-jdk which I confirmed has an accessible file.

+1
source

Source: https://habr.com/ru/post/1206267/


All Articles