JPype : fatal error: 'jni.h' file not found - java-native-interface

Hello I am trying to install JPype-0.5.4.2 using:
python setup.py install
And I get the following error:
In file included from src/native/common/jp_array.cpp:17:
src/native/common/include/jpype.h:45:10: fatal error: 'jni.h' file not found
#include <jni.h>
^
1 error generated.
error: command 'cc' failed with exit status 1
Any idea how to fix this? Thanks

I am on MacOSX 10.8.5 and this answer worked for me. After editing def setupInclusion(self):, I ran $ python setup.py install and was successful.
However, if you are on Linux instead, then check to see if you installed the JRE instead of the JDK. See this answer for more details.

jni.h is supplied in the include directory of the JDK.

Related

Rstudio, configure: error: GDALAllRegister not found in libgdal

I am a newbie and tried various methods already. I ran into problems from this one problem. please help. I think there are two problems here. 1) my c++ is not uptodate. 2) my GDALAllRegister not found in libgdal.
I am using mac 2017.
> install.packages("sf")
Installing package into ‘/Users/haoluo/Library/R/3.4/library’
(as ‘lib’ is unspecified)
There is a binary version available but the source version is later:
binary source needs_compilation
sf 0.6-1 0.6-3 TRUE
Do you want to install from sources the package which needs compilation?
y/n: y
installing the source package ‘sf’
...
In file included from /usr/local/Cellar/gdal/HEAD-41888/include/gdal.h:42:
/usr/local/Cellar/gdal/HEAD-41888/include/cpl_port.h:187:6: error: Must have C++11 or newer.
# error Must have C++11 or newer.
^
1 error generated.
In file included from gdal_test.cpp:1:
In file included from /usr/local/Cellar/gdal/HEAD-41888/include/gdal.h:42:
/usr/local/Cellar/gdal/HEAD-41888/include/cpl_port.h:187:6: error: Must have C++11 or newer.
# error Must have C++11 or newer.
^
1 error generated.
configure: Install failure: compilation and/or linkage problems.
configure: error: GDALAllRegister not found in libgdal.
ERROR: configuration failed for package ‘sf’
* removing ‘/Users/haoluo/Library/R/3.4/library/sf’
Warning in install.packages :
installation of package ‘sf’ had non-zero exit status
I failed to read the prompt in the first place. Now the problem has been solved by simply answering n to the question Do you want to install from sources the package which needs compilation?
I want to thank #nicola again for the help!
enter image description here

Fatal Error: 'openssl/conf.h' file not found

I'm using a compiler to try to make a set of files I've been given and the line #include breaks with the error: Fatal Error: 'openssl/conf.h' file not found.
I've already installed openssl using brew, but it doesn't seem to work. Do I need to somehow connect openssl with my folder that I'm working in?
I'm on the newest mac OS sierra.
Running:
brew info openssl
gives the solution :
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/openssl/lib
CPPFLAGS: -I/usr/local/opt/openssl/include

sylius installation issue PHP Fatal error:

Please help.
PHP Fatal error: require_once(): Failed opening required
'/home/roberto/sylius/app/bootstrap.php.cache'
(include_path='.:/usr/share/php:/usr/share/pear') in /home/roberto/sylius/app/console on line
15
How did you install Sylius? You should use Composer which will run bootstrap file generation script.

Cannot open include file: 'libxml/xmlversion.h': No such file or directory

While trying to install "lxml-3.1.0", I got the following error.
C:\Users\affine\Desktop\lib\lxml-3.1.0\src\lxml\includes\etree_defs.h(9) :
fatal error C1083: Cannot open include file: 'libxml/xmlversion.h':
No such file or directory
error: command '"C:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\cl.exe"'
failed with exit status 2
Could someone help me understand this and overcome this issue?
When I want to install pyshark==0.3.3for python2.7, there is an error with xslt-config. Its suggestion is to install VC++9.0 for python2.7.
After downloading Microsoft Visual C++ Compiler for Python 2.7 from http://www.microsoft.com/en-us/download/details.aspx?id=44266, I installed it. Then the similar error occurred:
src\lxml\includes\etree_defs.h(14) : fatal error C1083: Cannot open include file: 'libxml/xmlversion.h': No such file or directory
Compile failed: command 'C:\Users\Jeremy\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe' failed with exit status 2
So I install lxml in my windows command prompt using command easy_install.exe lxmlin the directory of G:\ProgramFiles\Python27\Scriptslike the following :
G:\ProgramFiles\Python27\Scripts>easy_install.exe lxml
In the first time when I ran this command, it answered me time out. And then I ran it again, it did work.

Trying to install OCaml 3.12.1 on Linux with Godi

I'm trying to install OCaml 3.12.1 on 64 bit Linux (Mint Linux which is essentially Ubuntu 11.04). I'm using the latest rocketboost (godi-rocketboost-20110717). I run ./bootstrap and after a while get the following (in bootstrap.log):
4287 ### Building godi-pcre
4288 ===> Cleaning for godi-pcre-6.2.2godi1
4289 => Checksum mismatch for pcre-ocaml-6.2.2.tar.gz.
4290 Make sure the Makefile and checksum file (/home/phil/godi-3.12.1/build/godi/ godi-pcre/distinfo)
4291 are up to date. If you want to override this check, type
4292 "godi_make NO_CHECKSUM=yes [other args]".
4293 Error: Exec error: File /home/phil/godi-3.12.1/build/godi/godi-pcre/./../../ mk/bsd.pkg.mk, line 1689: Command returned with non-zero exit code
4294 Error: Command fails with code 1: godi_console
Is this a package problem with pcre?
And how would I use the suggest "godi_make NO_CHECKSUM=yes [other args]" to fix this?
This has been fixed by the maintainer of the pcre-ocaml library. It should work fine now.