简体   繁体   English

通过 SSH 在远程机器上执行 /usr/bin/R 不起作用

[英]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 start Rserve with Rserve(args="--no-save")例如:您可以使用Rserve(args="--no-save")启动Rserve

Check here under Launching Rserve in the link below https://www.rforge.net/Rserve/doc.htmlhttps://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.

相关问题 Makefile with SHELL = / usr / bin / R:处理多行 - Makefile with SHELL=/usr/bin/R : handling multilines 如何修复 rJava 安装错误配置:错误:Java 解释器“/usr/bin/java”不起作用 - How to fix rJava install error configure: error: Java interpreter '/usr/bin/java' does not work 闪亮的错误:“ / usr / bin / R:第238行:/ usr / lib / R / etc / ldpaths:权限被拒绝” - Shiny error: “/usr/bin/R: line 238: /usr/lib/R/etc/ldpaths: Permission denied” / usr / bin / ld:在R中安装'RcppArmadillo'时找不到-lgfortran - /usr/bin/ld: cannot find -lgfortran when installing 'RcppArmadillo' in R R上的spacyr安装:/ usr / local / bin / python不是python可执行文件 - spacyr installation on R: /usr/local/bin/python is not a python executable R 中的 Python - 错误:找不到 /usr/bin/python 的 Python 环境 - Python in R - Error: could not find a Python environment for /usr/bin/python rpy2 不会安装在 mac 上不是目录:'/usr/local/bin/R/bin/R' - rpy2 will not install on a mac Not a directory: '/usr/local/bin/R/bin/R' 将RStudio与远程R机连接 - Connecting RStudio with Remote R machine 使用机器学习 2019 通过 R 脚本连接远程数据库 sql 时遇到问题 - Troubles connecting remote database sql via R script with Machine learning 2019 在Windows计算机上使用R进行SSH / SCP - SSH/SCP using R from a windows machine
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM