Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/oracle/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
加载ROracle失败:无法加载共享对象ROracle.so:libclntsh.so.11.1没有这样的文件或目录_Oracle_R_Rstudio - Fatal编程技术网

加载ROracle失败:无法加载共享对象ROracle.so:libclntsh.so.11.1没有这样的文件或目录

加载ROracle失败:无法加载共享对象ROracle.so:libclntsh.so.11.1没有这样的文件或目录,oracle,r,rstudio,Oracle,R,Rstudio,所以我不能装ROracle。我确实是非常新的这一点,所以任何信息是感激的,任何关于什么进一步的信息提供将是有益的 > library(ROracle) Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object '~/R/x86_64-pc-linux-gnu-library/2.14/ROracle/libs/ROracle.so': libclntsh.so.11.1: cann

所以我不能装ROracle。我确实是非常新的这一点,所以任何信息是感激的,任何关于什么进一步的信息提供将是有益的

> library(ROracle)
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '~/R/x86_64-pc-linux-gnu-library/2.14/ROracle/libs/ROracle.so':
  libclntsh.so.11.1: cannot open shared object file: No such file or directory
Error: package/namespace load failed for ‘ROracle’
ROracle.so就是它说的那样。libclntsh.so.11.1可以在
/usr/lib/oracle/11.2/client64/lib/libclntsh.so.11.1
上找到。这是
.libpath
的结果:

> .libPaths()
[1] "/home/nguiller/R/x86_64-pc-linux-gnu-library/2.14" "/usr/local/lib/R/site-library"                     "/usr/lib/R/site-library"                          
[4] "/usr/lib/R/library"                                "/usr/lib/rstudio/R/library" 
我的.Renviron文件

LD_LIBRARY_PATH="/usr/lib/oracle/11.2/client64/lib:/home/nguiller/Downloads/instantclient_11_2"
ORACLE_HOME="/usr/lib/oracle/11.2/client64/:/home/nguiller/Downloads/instantclient_11_2"
OCI_LIB="/usr/lib/oracle/11.2/client64/lib"
由于OCI库的原因,我在安装ROracle时遇到了很多麻烦,但它最终使用了
R CMD INSTALL--configure ags='--使用OCI lib=/usr/lib/oracle/11.2/client64/lib--使用OCI inc=/usr/include/oracle/11.2/client64'ROracle_1.1-8.tar.gz


让我知道我能提供什么帮助。

ORACLE\u HOME应该只指向一个位置。您不应该设置LD\u LIBRARY\u PATH\u 64变量吗?

我在加载“LIBRARY(ORE)”时遇到了相同的错误

看起来共享对象ROracle.so引用的是libclntsh.so.11.1,而不是libclntsh.so.12.1

bash-4.1$ pwd
/usr/lib64/R/library
bash-4.1$ grep -irsh "libclntsh.so.11.1" *
Binary file ROracle/libs/ROracle.so matches
作为解决方法,我创建了一个符号链接,以便libclntsh.so.12.1可以被称为libclntsh.so.11.1

$ cd /scratch/softwares/R/db_instant_client/instantclient_12_1

 ln -s libclntsh.so.12.1 libclntsh.so.11.1
完成此步骤后,我能够成功加载库(ORE)


有关更多详细信息,请参见。

设置$LD\u LIBARARY\u PATH=$ORACLE\u HOME/lib

如果您确实希望在R环境中执行此操作,可以按如下方式加载特定库:

dyn.load("/usr/lib/oracle/11.2/client64/lib/libclntsh.so.11.1")
library(ROracle)
参考资料:


/etc/rstudio/rserver.conf

rsession-ld-library-
path=/usr/lib64/R/lib:/home/oracle/app/oracle/product/12.1.0/client_1/lib
然后重新启动Rserver

sudo rstudio-server stop
sudo rstudio-server start

这对我很有帮助。

在我导出env变量(.Renviron似乎不起作用)之后,这就起作用了。非常感谢你
export LD_LIBRARY_PATH=“/usr/lib/oracle/11.2/client64/lib:/home/nguiller/Downloads/instantclient_11_2”&&export-oracle_home=“/usr/lib/oracle/11.2/client64/”&&export-OCI_-lib=“/usr/lib/oracle/11.2/client64/lib”&&export-LD_-LIBRARY-PATH_路径_64=“/usr/lib/oracle/11.2/client64/lib:/home/nguiller/nguiller/Downloads/11.2”
我遇到了完全相同的问题

library(ORE)加载所需的包:dyn.load(file,DLLpath=DLLpath,…)中的OREdm错误:无法加载共享对象“/home/usernamehere/R/x86_64-redhat-linux-gnu library/3.2/ROracle/libs/ROracle.so”:libclntsh.so.11.1:无法打开共享对象文件:没有此类文件或目录错误:无法加载包“OREdm”

您在用户目录中引用了instantclient_11_2。你是怎么做到的。。。未下载的文件?@Madmartigan检查您的安装(文件在那里…)和环境变量(平台的库路径)干杯,我有一个血淋淋的打字错误..我看了很多次。。。正确的LD_库路径是需要instantclient_11_2位置的路径。。。现在一切都好了。。。快乐时光:)注意——在一些linux发行版上,您必须在so.Hello上的每一篇文章中修改
/etc/LD.so.conf.d/*.conf
中的
LD\u LIBRARY\u PATH
,欢迎来到Stack Overflow。在包含指向您自己网站或博客的链接时,请务必小心——您应该始终披露您的从属关系。有关详细指导,请参阅。/etc/rstudio/rserver.conf是只读的。
sudo rstudio-server stop
sudo rstudio-server start