简体   繁体   English

R软件包安装:使用本地安装的库

[英]R package install: using locally installed libraries

In particular I am trying to install rggobi locally on linux (I don't have root access). 特别是我正在尝试在Linux上本地安装rggobi(我没有root访问权限)。 So I installed ggobi locally 所以我在本地安装了ggobi

cd ggobi-2.1.11/
./configure --prefix=~/my-apps/ --with-all-plugins
make
make install

That went fine. 很好 Then I tried 然后我尝试

$ R CMD INSTALL /tmp/Rtmp2PL6au/downloaded_packages/rggobi_2.1.20.tar.gz -l ~/R/x86_64-redhat-linux-gnu-library/3.1/
* installing *source* package ‘rggobi’ ...
** package ‘rggobi’ successfully unpacked and MD5 sums checked
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for GGOBI... no
configure: error: Package requirements (ggobi >= 2.1.6) were not met:
No package 'ggobi' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix.
Alternatively, you may set the environment variables GGOBI_CFLAGS and GGOBI_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
ERROR: configuration failed for package ‘rggobi’
* removing ‘/apps/infrafs1/rdahiya/R/x86_64-redhat-linux-gnu-library/3.1/rggobi’

I tried adding ~/my-apps/lib/pkgconfig/ in PKG_CONFIG_PATH which helped the installtion go little further but at the end it gives different error 我尝试在PKG_CONFIG_PATH中添加〜/ my-apps / lib / pkgconfig /,这有助于使安装过程更进一步,但最后却给出了不同的错误

building package indices
testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
unable to load shared object '~/R/x86_64-redhat-linux-gnu-library/3.1/rggobi/libs/rggobi.so': libggobi.so.0: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
ERROR: loading failed
removing ‘~/R/x86_64-redhat-linux-gnu-library/3.1/rggobi’

libggobi.so.0 is there in ~/my-apps/lib/. libggobi.so.0在〜/ my-apps / lib /中。 Any suggestion how to make R to look at correct place? 有什么建议如何使R看正确的地方?

I have found a (the?) work around. 我发现(the?)解决方法。 I have to set LD_LIBRARY_PATH=~/my-apps/lib/ while installing or while running any future R session where I want to load rggobi. 在安装或运行将来要加载rggobi的任何R会话时,我必须设置LD_LIBRARY_PATH =〜/ my-apps / lib /。 Please share if you have more clean solution. 如果您有更干净的解决方案,请分享。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM