简体   繁体   English

线程“ main”中的异常java.lang.UnsatisfiedLinkError:java.library.path中没有libz3java

[英]Exception in thread “main” java.lang.UnsatisfiedLinkError: no libz3java in java.library.path

I am a beginner when it comes to z3 and java and have been trying to install it for quite some while now. 我是z3和Java的初学者,并且已经尝试安装它一段时间了。 I have followed all the instructions given on http://leodemoura.github.io/blog/2012/12/10/z3-for-java.html and it has been successful till it comes to the last step, that is to run - 我已经按照http://leodemoura.github.io/blog/2012/12/10/z3-for-java.html上给出的所有说明进行操作,并且成功进行到最后一步,即运行--

"LD_LIBRARY_PATH=. java -cp com.microsoft.z3.jar:. JavaExample" (on Linux and FreeBSD) command. “ LD_LIBRARY_PATH =。java -cp com.microsoft.z3.jar:.JavaExample”(在Linux和FreeBSD上)命令。

Then I get an error stating that - Exception in thread "main" java.lang.UnsatisfiedLinkError: no libz3java in java.library.path: [., /usr/java/packages/lib, /usr/lib/x86_64-linux-gnu/jni, /lib/x86_64-linux-gnu, /usr/lib/x86_64-linux-gnu, /usr/lib/jni, /lib, /usr/lib] 然后,我得到一个错误,指出-线程“ main”中的异常java.lang.UnsatisfiedLinkError:java.library.path中没有libz3java:[。,/ usr / java / packages / lib,/ usr / lib / x86_64-linux- gnu / jni,/ lib / x86_64-linux-gnu,/ usr / lib / x86_64-linux-gnu,/ usr / lib / jni,/ lib,/ usr / lib]

To solve this I googled and found out that you need to set the LD_LIBRARY_PATH, I have followed the advice given on the various pages but have not been successful. 为了解决这个问题,我搜索了一下,发现您需要设置LD_LIBRARY_PATH,我遵循了各个页面上给出的建议,但是没有成功。 Also, on the input of " env | grep '^LD_LIBRARY_PATH' " I get - LD_LIBRARY_PATH=/home/chaitanya/z3/build, which is where my libz3java.so file is located and I believe that is what is being asked for. 另外,在“ env | grep'^ LD_LIBRARY_PATH'”的输入中,我得到-LD_LIBRARY_PATH = / home / chaitanya / z3 / build,这是我的libz3java.so文件所在的位置,并且我相信这就是所要的。

Can you please tell me how to get it working ? 你能告诉我如何使它工作吗? Last time I had changed the permission of my entire 'usr' folder and pasted the libz3java.so file by changing the permissions of the entire folder and that led to a lot of problems and complications and finally led to me formatting my system with a fresh install of Ubuntu. 上一次我更改了整个'usr'文件夹的许可权,并通过更改整个文件夹的许可权粘贴了libz3java.so文件,这导致了很多问题和复杂性,最后导致我重新格式化了系统安装Ubuntu。 What would be the easiest way to solve this problem and get z3 java bindings running on my system ? 解决此问题并在系统上运行z3 java绑定的最简单方法是什么?

Just in case: on OSX it's DYLD_LIBRARY_PATH . 以防万一:在OSX上为DYLD_LIBRARY_PATH For some Java versions it may be necessary to add the Z3 directory to java.library.path as indicated in your error message. 对于某些Java版本,可能有必要按照错误消息中的指示将Z3目录添加到java.library.path中。 Ie, Run java -Djava.library.path="/path/to/directory/containing/libz3java.so" ... 即,运行java -Djava.library.path="/path/to/directory/containing/libz3java.so" ...

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 线程“ main”中的异常java.lang.UnsatisfiedLinkError:java.library.path中没有opencv_java2410 - Exception in thread “main” java.lang.UnsatisfiedLinkError: no opencv_java2410 in java.library.path 线程“main”中的异常 java.lang.UnsatisfiedLinkError:java.library.path 中没有 opencv_java249 - Exception in thread "main" java.lang.UnsatisfiedLinkError: no opencv_java249 in java.library.path 线程“主”java.lang.UnsatisfiedLinkError 中的异常:java.library.path 中没有 opencv_java451: - Exception in thread “main” java.lang.UnsatisfiedLinkError: no opencv_java451 in java.library.path: 线程“ main”中的异常java.lang.UnsatisfiedLinkError:java.library.path中没有libopencv_java247 - Exception in thread “main” java.lang.UnsatisfiedLinkError: no libopencv_java247 in java.library.path 线程“ main”中的异常java.lang.UnsatisfiedLinkError:java.library.path中没有indri_jni - Exception in thread “main” java.lang.UnsatisfiedLinkError: no indri_jni in java.library.path 线程“main”中的异常 java.lang.UnsatisfiedLinkError:java.library.path 中没有 lpsolve55j - Exception in thread “main” java.lang.UnsatisfiedLinkError: no lpsolve55j in java.library.path 线程“ main”中的异常java.lang.UnsatisfiedLinkError:java.library.path中没有终端 - Exception in thread “main” java.lang.UnsatisfiedLinkError: no Terminal in java.library.path 线程“main”中的异常java.lang.UnsatisfiedLinkError:java.library.path中没有jpcap - Exception in thread “main” java.lang.UnsatisfiedLinkError: no jpcap in java.library.path 线程“ main”中的异常java.lang.UnsatisfiedLinkError:java.library.path中没有swt-pi-gtk-3139 - Exception in thread “main” java.lang.UnsatisfiedLinkError: no swt-pi-gtk-3139 in java.library.path 线程“main”中的异常java.lang.UnsatisfiedLinkError:java.library.path中没有lwjgl - Exception in thread “main” java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM