gpt4 book ai didi

ROracle : 64bit install on MacOSX 10. 8(山狮)

转载 作者:行者123 更新时间:2023-12-04 02:10:02 27 4
gpt4 key购买 nike

我在 Mac OSX 10.8.5 上安装了 64 位 R(R 版本 2.15.2 (2012-10-26) --“不给糖就捣蛋”),并安装了来自 Oracle 的 Oracle Instantclient 版本 11.2.0.3.0。我已经获得了 sqlplus,以及 Perl 和 Python 来运行它们。现在我正在尝试构建 ROracle。它需要从源代码构建,所以我下载了它并尝试运行:

R CMD INSTALL ROracle_1.1-10.tar.gz

但是,我认为它期望的目录结构与 Instant Client 给我的目录结构不同。例如,当我尝试运行该命令时,我得到:

$ R CMD INSTALL ROracle_1.1-10.tar.gz
* installing to library ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library’
* installing *source* package ‘ROracle’ ...
** package ‘ROracle’ successfully unpacked and MD5 sums checked
configure: error: "/Applications/instantclient_11_2/lib" directory does not exist
ERROR: configuration failed for package ‘ROracle’
* removing ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library/ROracle’

的确,我的“/Applications/instantclient_11_2”目录中没有“lib”目录。但是,我确实尝试通过创建一个并链接到“/Applications/instantclient_11_2”目录中的 .dylib 文件来伪造它,并且我克服了这个错误,发现了一个新错误:

$ R CMD INSTALL ROracle_1.1-10.tar.gz
* installing to library ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library’
* installing *source* package ‘ROracle’ ...
** package ‘ROracle’ successfully unpacked and MD5 sums checked
configure: error: "/Applications/instantclient_11_2/rdbms/public" directory does not exist
ERROR: configuration failed for package ‘ROracle’
* removing ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library/ROracle’

所以它现在正在寻找另一个不存在的目录。我不想继续猜测它期望的目录,并试图用它应该在这些目录中期望的文件链接来填充它(我什至不知道它在这里期望什么)。

还有其他安装方法吗?基于 Perl 和 Python 可以使用这些驱动程序这一事实,我认为我应该能够做到这一点。

谢谢,马特

最佳答案

我认为您设置了“ORACLE_HOME”变量。我遇到了同样的问题,我一遇到就

export ORACLE_HOME=""

我可以成功编译 ROracle。

之前:

me@my-laptop:~/Downloads$ R CMD INSTALL ROracle_1.1-10.tar.gz
*installing to library ‘/opt/R/library’
* installing *source* package ‘ROracle’ ...
** package ‘ROracle’ successfully unpacked and MD5 sums checked
configure: error: "/usr/lib/oracle/12.1/rdbms/public" directory does not exist
ERROR: configuration failed for package ‘ROracle’
* removing ‘/opt/R/library/ROracle’

之后:

me@my-laptop:~/Downloads$ export ORACLE_HOME=""
me@my-laptop:~/Downloads$ R CMD INSTALL ROracle_1.1-10.tar.gz
* installing to library ‘/opt/R/library’
* installing *source* package ‘ROracle’ ...
** package ‘ROracle’ successfully unpacked and MD5 sums checked
configure: creating ./config.status
config.status: creating src/Makevars
** libs
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I/opt/oracle/sdk/include -fpic -O2 -pipe -g -c rodbi.c -o rodbi.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I/opt/oracle/sdk/include -fpic -O2 -pipe -g -c rooci.c -o rooci.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I/opt/oracle/sdk/include -fpic -O2 -pipe -g -c routl.c -o routl.o
gcc -std=gnu99 -shared -o ROracle.so rodbi.o rooci.o routl.o -L/opt/oracle -lclntsh -L/usr/lib/R/lib -lR
installing to /opt/R/library/ROracle/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (ROracle)

关于ROracle : 64bit install on MacOSX 10. 8(山狮),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19286400/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com