如何指定R CMD exec目录? [英] How to specify R CMD exec directory?

查看:99
本文介绍了如何指定R CMD exec目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以前,我已经能够通过以下命令从命令行启动Rserve:

Previously I have been able to start Rserve from the command line via:

R CMD Rserve

在Ubuntu上升级到3.0.2后,我得到:

After upgrading to 3.0.2 on Ubuntu, I get:

/usr/lib/R/bin/Rcmd: 62: exec: Rserve: not found

我尝试通过手动重新安装并启动

I've tried reinstalling and launching manually via

R
> install.packages('rserve')
> ...compiles successfully...
> RServe()
Starting Rserve:
 /usr/lib/R/bin/R CMD /home/user1/R/x86_64-pc-linux-gnu-library/3.0/Rserve/libs//Rserve

...效果很好.

R CMD Rserve仍然失败,并出现与上述相同的错误.我尝试通过以下方式指定路径:

R CMD Rserve still fails with the same error as above. I've tried specifying the path via:

export RHOME="/home/jwiley/R/x86_64-pc-linux-gnu-library/3.0/Rserve/libs/"
export R_LIBS="/home/jwiley/R/x86_64-pc-linux-gnu-library/3.0/Rserve/libs/"

如何说服R CMD使用正确的目录?

How can I convince R CMD to use the correct directory?

推荐答案

就我而言,这就是解决方法(在安装Rserve之后):

In my case this was the fix (after installing Rserve):

cd /usr/lib/R/bin
ln -s /usr/lib/R/site-library/Rserve/libs/Rserve Rserve

这已解决了Ubuntu 14.04(LTS)上的问题

This fixed the problem on Ubuntu 14.04 (LTS)

R库的位置可能有所不同,可以从R中检查Rserve的实际路径:

R library location may vary, actual path to Rserve can be checked from R:

system.file("libs", "Rserve", package="Rserve")

这篇关于如何指定R CMD exec目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆