无法安装 Shiny Server

无法安装 Shiny Server

按照指示这里安装 Shiny 服务器,遇到错误 -Failed to open the software package如下所示。

> sudo gdebi shiny-server-1.5.3.838-amd64.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Building data structures... Done
Failed to open the software package
The package might be corrupted or you are not allowed to open the file. Check the permissions of the file.

权限

> ls -al
total 83140
drwxr-x---  3 tom users     4096 Mar 16 07:23 .
drwxrwx--x  5 tom users     4096 Mar 16 08:26 ..
drwxr-x--- 27 tom users    24576 Feb 12 07:48 ruby-2.4.0
-rw-r-----  1 tom users 14104044 Dec 25 04:30 ruby-2.4.0.tar.gz
-rw-r-----  1 tom users 70643942 Feb 25 03:23 shiny-server-1.5.3.838-amd64.deb
>

没有 sudo

> gdebi shiny-server-1.5.3.838-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.
Need to be root to install packages
>

更新 - 使用 dpkg

> sudo dpkg -i shiny-server-1.5.3.838-amd64.deb
dpkg-split: error: unable to read part file `shiny-server-1.5.3.838-amd64.deb': Permission denied
dpkg: error processing archive shiny-server-1.5.3.838-amd64.deb (--install):
 subprocess dpkg-split returned error exit status 2
Errors were encountered while processing:
 shiny-server-1.5.3.838-amd64.deb
>

答案1

由于此企业机器中的特定权限设置,已通过 chmod 以非 sudo 用户身份修复了此问题。

> chmod 0664 shiny-server-1.5.3.838-amd64.deb
> ls -al
total 83140
drwxr-x---  3 tom users     4096 Mar 16 07:23 .
drwxrwx--x  5 tom users     4096 Mar 16 08:26 ..
-rw-rw-r--  1 tom users 70643942 Feb 25 03:23 shiny-server-1.5.3.838-amd64.deb
>

> sudo gdebi shiny-server-1.5.3.838-amd64.deb
Enter password for tom (INTRANETPASS):
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 ... 81902 files and directories currently installed.)
Preparing to unpack shiny-server-1.5.3.838-amd64.deb ...
Unpacking shiny-server (1.5.3.838) ...
Setting up shiny-server (1.5.3.838) ...
Creating user shiny
Adding LANG to /etc/init/shiny-server.conf, setting to en_US.UTF-8
shiny-server start/running, process 8854
>

鸣谢 - 来自@steeldriver、@bistoco 的提示

相关内容