gpt4 book ai didi

r - 在 Debian VM 上安装 Shiny 的服务器

转载 作者:行者123 更新时间:2023-12-04 18:36:45 24 4
gpt4 key购买 nike

我试图在离线 Debian VM 上托管 Shiny 的应用程序。所以,首先,我在虚拟机上安装带有 apt-get 的 R-version 3.1.1:

$ sudo apt-get update
$ sudo apt-get install r-base
$ sudo apt-get install r-base-dev

然后,我从本地将“ Shiny ”包的所有 tar.gz 文件(包括所有依赖项)scp 到 VM,并使用“R CMD ...”成功安装它们。之后,我运行以下命令来安装“gdebi”并使用它为 Shiny 的服务器安装“shiny-server-1.3.0.403-amd64.deb”。
$ sudo apt-get install gdebi-core
$ sudo gdebi shiny-server-1.3.0.403-amd64.deb

它在第一时间返回错误,表明缺少依赖项:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Building data structures... Done
Building data structures... Done
This package is uninstallable
Dependency is not satisfiable: libssl0.9.8

然后,我按照另一篇文章将以下行添加到“etc/apt/sources.list”文件中,然后使用“apt-get”安装缺少的依赖项:
 deb http://security.ubuntu.com/ubuntu lucid-security main

$ sudo apt-get install libssl0.9.8
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
libssl0.9.8
0 upgraded, 1 newly installed, 0 to remove and 26 not upgraded.
Need to get 988 kB of archives.
After this operation, 2,408 kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
libssl0.9.8
Install these packages without verification? [y/N] y
Get:1 http://security.ubuntu.com/ubuntu/ lucid-security/main libssl0.9.8 amd64 0.9.8k-7ubuntu8.27 [988 kB]
Fetched 988 kB in 1s (902 kB/s)
Preconfiguring packages ...
Selecting previously unselected package libssl0.9.8.
(Reading database ... 46468 files and directories currently installed.)
Preparing to unpack .../libssl0.9.8_0.9.8k-7ubuntu8.27_amd64.deb ...
Unpacking libssl0.9.8 (0.9.8k-7ubuntu8.27) ...
Setting up libssl0.9.8 (0.9.8k-7ubuntu8.27) ...
Processing triggers for libc-bin (2.19-18+deb8u3) ...

它似乎有效,我安装了“shiny-server-1.3.0.403-amd64.deb”:
$ sudo gdebi shiny-server-1.3.0.403-amd64.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Building data structures... Done
Building data structures... Done

Shiny Server
Shiny Server is a server program from RStudio, Inc. that makes Shiny applications available over the web. Shiny is a web application framework for the R statistical computation language.
Do you want to install the software package? [y/N]:y
Selecting previously unselected package shiny-server.
(Reading database ... 46487 files and directories currently installed.)
Preparing to unpack shiny-server-1.3.0.403-amd64.deb ...
Unpacking shiny-server (1.3.0.403) ...
Setting up shiny-server (1.3.0.403) ...
Creating user shiny
grep: /etc/init/shiny-server.conf: No such file or directory
Adding LANG to /etc/init.d/shiny-server, setting to en_US.UTF-8

然而,当我尝试从终端“停止/启动” Shiny 的服务器时,cli 无法识别该命令:
$ sudo stop shiny-server
sudo: stop: command not found

我想知道我是否正确安装了服务器?如何“启动/停止” Shiny 服务器?

最佳答案

我一直在 Debian Wheezy 上以这种方式使用 shiny-server,但是当我升级到 Debian Jessie 时切换到自编译,因为这是每个 RStudio 文档的推荐路线。

为了回答您的问题,shiny-server 使用 init.d 脚本进行管理。要启动服务器,您应该运行 /etc/init.d/shiny-server startservice shiny-server start作为根 (sudo)。

关于r - 在 Debian VM 上安装 Shiny 的服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36948162/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com