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

时间:2014-08-29 12:57:49

标签: r installation rggobi

特别是我试图在linux上本地安装rggobi(我没有root访问权限)。所以我在本地安装了ggobi

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

那很好。然后我试了

$ 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’

我尝试在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在〜/ my-apps / lib /中。有任何建议如何让R看正确的位置?

1 个答案:

答案 0 :(得分:0)

我找到了一个(?)的工作。我必须在安装时运行LD_LIBRARY_PATH =〜/ my-apps / lib /,或者在运行任何我希望加载rggobi的R会话时运行。如果您有更清洁的解决方案,请分享。