[英]Executing /usr/bin/R on remote machine via SSH does not work
I want to login to a remote server via ssh and start R afterwards.我想通过 ssh 登录到远程服务器,然后再启动 R。
ssh -X user@166.167.0.1 '/usr/bin/R'
Fatal error: you must specify '--save', '--no-save' or '--vanilla'
致命错误:您必须指定“--save”、“--no-save”或“--vanilla”
Which tells me that start of R failed.这告诉我 R 的启动失败了。
How can I solve it ?我该如何解决?
According to this Q&A in this github根据这个github中的这个问答
It seems like the source of the problem is not with /usr/bin/R
parameters, but with the parameters of the RServe
itself.似乎问题的根源不是与
/usr/bin/R
参数有关,而是与RServe
本身的参数有关。
This is a message from
Rserve
itself, and in the documentation.这是来自
Rserve
本身和文档中的消息。 eg: You can startRserve
withRserve(args="--no-save")
例如:您可以使用
Rserve(args="--no-save")
启动Rserve
Check here under Launching Rserve in the link below https://www.rforge.net/Rserve/doc.html
在https://www.rforge.net/Rserve/doc.html下面的链接中的 Launching Rserve 下检查此处
More info from Rserve docs :来自Rserve 文档的更多信息:
Launching Rserve Rserve comes now as an R package, so one way to start Rserve is from within R, just type
启动 Rserve Rserve 现在作为 R 包提供,因此启动 Rserve 的一种方法是从 R 中,只需键入
library(Rserve) Rserve()
That command knows how to find Rserve, how to setup the environment and how to start it, regardless of your platform.
该命令知道如何查找 Rserve、如何设置环境以及如何启动它,而不管您的平台如何。
Note: depending on how you are running R, it may require additional parameters such as --no-save (R will tell you).
注意:根据您运行 R 的方式,它可能需要额外的参数,例如 --no-save(R 会告诉您)。 In that case you have to pass that parameter in the args argument such as
在这种情况下,您必须在 args 参数中传递该参数,例如
Rserve(args="--no-save")
However, Rserve is a stand-alone program, so it can be started directly as well.
然而,Rserve 是一个独立的程序,所以它也可以直接启动。 If you installed Rserve from a source package (on unix), type:
如果您从源包(在 unix 上)安装了 Rserve,请键入:
R CMD Rserve
Depending on the purpose and libraries on your computer you may want to add --gui-none or --no-save (see R documentation).
根据您计算机上的用途和库,您可能需要添加 --gui-none 或 --no-save (请参阅 R 文档)。 Rserve passes any parameters to the underlying R engine except for Rserver-related parameters (see command line arguments).
Rserve 将任何参数传递给底层 R 引擎,但与 Rserver 相关的参数除外(请参阅命令行参数)。 After initialization Rserve daemonizes itself to work as a server.
初始化后,Rserve 将自身作为服务器运行。 It can be shut down gracefully (ie it will wait until all existing connections are finished) if it recieves shutdown command from an authorized connection.
如果它收到来自授权连接的关闭命令,它可以正常关闭(即它将等待所有现有连接完成)。 It terminates not so gracefully if it receives usual termination signals.
如果它接收到通常的终止信号,它就不会那么优雅地终止。
If no config file is supplied, Rserve accepts no remote connections, requires no authentication and file transfer is enabled.
如果未提供配置文件,则 Rserve 不接受远程连接,不需要身份验证并启用文件传输。 For more details about how to configure Rserve, see below.
有关如何配置 Rserve 的更多详细信息,请参见下文。
Answering the question in the note:回答笔记中的问题:
You should configure Rserve
on the remote host.您应该在远程主机上配置
Rserve
。
The configuration process can be done once, using Rserve
configuration files.配置过程可以使用
Rserve
配置文件完成一次。
In order to login to the remote host, you can use the following command:为了登录到远程主机,您可以使用以下命令:
ssh -X user@166.167.0.1
Start Rserve
with --no-save
parameter:使用
--no-save
参数启动Rserve
:
R CMD Rserve(args="--no-save")
Here is a discussion how to setup Rserve
as a service.这里讨论如何将
Rserve
设置为服务。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.