我刚刚安装了Rstudio并想要一些打包使用,我使用linux mint,当我试图安装xlsx包时给出了与rjava相关的错误,所以我安装了rjava包,但它无法加载,而是我得到这个错误:
>library("rJava", lib.loc="/usr/lib/R/site-library")
Error : .onLoad failed in loadNamespace() for 'rJava', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/usr/lib/R/site-
library/rJava/libs/rJava.so':
libjvm.so: cannot open shared object file: No such file or directory
Error: package or namespace load failed for ‘rJava’
>detach("package:rJava", unload=TRUE)
Error in detach("package:rJava", unload = TRUE) : invalid 'name'
argument
我曾多次尝试过R CMD javareconf,但仍无法解决问题
答案 0 :(得分:2)
您可能想要找到库,您可以使用--lock-tables, -l
Lock all tables before dumping them. The tables are locked with READ
LOCAL to allow concurrent inserts in the case of MyISAM tables. For
transactional tables such as InnoDB and BDB, --single-transaction is
a much better option, because it does not need to lock the tables at
all.
命令或查看以下标准路径:
whereis
找到它后,复制其文件夹的路径。
然后将其添加到位于
/usr/lib/jvm/java-7-oracle/lib/amd64
/usr/lib/jvm/java-7-oracle/jre/lib/amd64/server
的LD_LIBRARY_PATH环境变量中(如果需要,创建文件)。
~/.profile
如果您已经设置了LD_LIBRARY_PATH,则可能需要保留它,因此
export LD_LIBRARY_PATH=/usr/lib/jvm/java-7-oracle/lib/amd64:/usr/lib/jvm/java-7-oracle/jre/lib/amd64/server
并将其内容添加到echo $LD_LIBRARY_PATH
文件中。
您可以重新启动以重新加载.profile,或者您只需~/.profile
组成终端。
仅结束source ~/.profile
。