有关loading share object file libjvm.so: xxxxx 的那些问题
今天在跑一个有关postgresql产品的测试,要测试postgresql的有关Mirroring Controller的功能。
在执行mc_ctl命令的时候,报错:error while loading share object file libjvm.so: No such file or directory.
调查了一下发现是对LD_LIBRARY_PATH 环境变量的设置有问题,没有提供含有libjvm.so的路径,自然找不到。于是先在系统中寻找libjvm.so文件的位置:
find / -name libjvm.so
输出如下:


既然是编译server,那么就选了一条路径中含有server的添加到LD_LIBRARY_PATH变量中:
export LD_LIBRARY_PATH=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre/lib/x86_64/server:$LD_LIBRARY_PATH
再次运行,又出错了,这次报的错不太一样了 libjvm.so: no version information available.
看到这,估计你就明白了。对的,是java的版本没选对。选择的库文件的版本过低,mc_ctl命令无法识别,故报此错误。那么改正就很简单了。
再次修改LD_LIBRARY_PATH变量,选择正确版本(即选择一个高版本的库文件路径)的库文件的路径如下:
export LD_LIBRARY_PATH= /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/server:$LD_LIBRARY_PATH
设置好该变量后,再次运行测试程序,不再报此错误,可以正常运行了。
有关loading share object file libjvm.so: xxxxx 的那些问题的更多相关文章
- 安装mysql报错:Can't find messagefile '/usr/share/mysql/english/errmsg.sys'和/usr/bin/mysqladmin: error while loading shared libraries: libmysqlclient.so.16: cannot open shared object file: No such file or
使用yum安装mysql服务端: [root@centos ~]# yum -y install mysql-server Loaded plugins: fastestmirror, securit ...
- python3: error while loading shared libraries: libpython3.5m.so.1.0: cannot open shared object file: No such file or directory
安装python3遇到报错: wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz ./configure --prefix=/u ...
- error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory
zabbix3.2启动有如下报错: # service zabbix_server startStarting zabbix_server: /home/zabbix-server/sbin/zab ...
- 错误解决:error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory
执行以下代码,生成唯一的UID $fp = popen("/xxx/bin/tools/uuidgen system", "r");// $uid = frea ...
- 【转】error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such file or directory
错误信息: /usr/local/memcacheq/bin/memcacheq: error while loading shared libraries: libevent-2.0.so.5: c ...
- 解决openssl: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory错误
问题 在Centos7上编译安装openssl后,运行openssl version出现如下错误: openssl: error while loading shared libraries: lib ...
- error while loading shared libraries: libXXX.so.x: cannot open shared object file: No such file or directory .
转载:http://www.eefocus.com/pengwr/blog/2012-02/235057_baf52.html 此时你可以locate libXXX.so.x 一下,查看系统里是否有该 ...
- Ubuntu12.04安装64位系统出现编译错误error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or dir
问题: Ubuntu12.04安装64位系统出现编译错误error while loading shared libraries: libz.so.1: cannot open shared obje ...
- 运行编译后的程序报错 error while loading shared libraries: lib*.so: cannot open shared object file: No such file or directory
运行编译后的程序报错 error while loading shared libraries: lib*.so: cannot open shared object file: No such f ...
随机推荐
- 275. H-Index II
题目: Follow up for H-Index: What if the citations array is sorted in ascending order? Could you optim ...
- Spring AOP基础知识
Spring AOP使用动态代理技术在运行期织入增强的代码,两种代理机制包括:一是基于JDK的动态代理,另一种是基于CGLib的动态代理.之所以需要两种代理机制,很大程度上是因为JDK本身只提供接口的 ...
- ajax 一个 gbk 目标后内容乱码的解决方案
ajax 一个 gbk 目标后,如果内容出现乱码,说明服务器在送出内容时没有指定 charset,ajax 对于没有指定 charset 的 response 默认以 utf-8 来处理,所有出现乱码 ...
- linux中/etc/init.d [转]
一.关于/etc/init.d 如果你使用过linux系统,那么你一定听说过init.d目录.这个目录到底是干嘛的呢?它归根结底只做了一件事情,但这件事情非同小可,是为整个系统做的,因此它非常重要.i ...
- [HDOJ2602]Bone Collector(01背包)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2602 裸的... #include <algorithm> #include <io ...
- cdoj 1329 卿学姐与魔法 优先队列
卿学姐与魔法 Time Limit: 1200/800MS (Java/Others) Memory Limit: 65535/65535KB (Java/Others) Submit Sta ...
- IE下easyui 缓存问题
$.ajaxSetup ({ cache: false //关闭AJAX相应的缓存 }); 这一句话就足够了,很管用!
- CSS_简介/语法结构/长度单位/应用方式/标签的样式重置/表单样式重置
一.CSS简介: w3c(World Wide Web Consortium):万维网联盟,是规定网页标准的一个组织(叫做Web标准) Web标准:是由w3c和其他标准化组织制定的一系列标准的集合, ...
- SQLite及ORMlite在WebApp中的使用
Spring 配置 下面的databaseUrl在windows下,指向了c:/user/yourhome路径,暂时没想到怎么配置到WEBAPP根路径下. 因为是轻量级工控webapp,数据库规模不大 ...
- 漫游Kafka实战篇之客户端API
Kafka Producer APIs 旧版的Procuder API有两种:kafka.producer.SyncProducer和kafka.producer.async.AsyncProduce ...