R语言 非零退出状态:Ubuntu EC2 AWS上的“闪亮管理器”

wmomyfyw  于 2023-02-06  发布在  其他
关注(0)|答案(1)|浏览(105)

我尝试在ubuntu的AW2示例上托管一个shiny应用程序。这是我第一次尝试使用EC2示例,也是我需要安装的最后一个软件包,应用程序的"shinymanager"给出了一个非零退出状态。请告诉我如何在ubuntu ec2示例上安装"shinymanager"到shiny-server。
Ubuntu版本:十八点零四分以上
R版本:R version 4.1.2 (2021-11-01) -- "Bird Hippie"
以下所有软件包均已通过此方法成功安装:

  1. /srv/shiny-server$ sudo R
  2. packages(c("软件包名称"),依赖项= T)
    全局文件中存在已正确安装的程序包
library(tidyverse)
library(here)
library(janitor)
#library(lubridate)
#library(RPostgres)
#library(rstudioapi)
library(shinyWidgets)
library(DT)
#library(glue)
library(shinycssloaders)
#library(DBI)
library(gargle)
library(shinyalert)
library(googledrive)
library(shinylogs)
library(cachem)
library(shinymanager)

下面是我在尝试install.packages("shinymanager", dependencies = T)时收到的数据和错误

install.packages("shinymanager", dependencies = T)
Installing package into ‘/root/R/x86_64-pc-linux-gnu-library/4.1’
(as ‘lib’ is unspecified)
also installing the dependencies ‘sodium’, ‘RSQLite’, ‘keyring’

trying URL 'https://cloud.r-project.org/src/contrib/sodium_1.2.1.tar.gz'
Content type 'application/x-gzip' length 468055 bytes (457 KB)
==================================================
downloaded 457 KB

trying URL 'https://cloud.r-project.org/src/contrib/RSQLite_2.2.20.tar.gz'
Content type 'application/x-gzip' length 3745301 bytes (3.6 MB)
==================================================
downloaded 3.6 MB

trying URL 'https://cloud.r-project.org/src/contrib/keyring_1.3.1.tar.gz'
Content type 'application/x-gzip' length 45779 bytes (44 KB)
==================================================
downloaded 44 KB

trying URL 'https://cloud.r-project.org/src/contrib/shinymanager_1.0.410.tar.gz'
Content type 'application/x-gzip' length 2191864 bytes (2.1 MB)
==================================================
downloaded 2.1 MB

* installing *source* package ‘sodium’ ...
** package ‘sodium’ successfully unpacked and MD5 sums checked
** using staged installation
Package libsodium was not found in the pkg-config search path.
Perhaps you should add the directory containing `libsodium.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libsodium' found
Using PKG_CFLAGS=
Using PKG_LIBS=-lsodium
--------------------------- [ANTICONF] --------------------------------
Configuration failed because libsodium was not found. Try installing:
 * deb: libsodium-dev (Debian, Ubuntu, etc)
 * rpm: libsodium-devel (Fedora, EPEL)
 * csw: libsodium_dev (Solaris)
 * brew: libsodium (OSX)
If libsodium is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a libsodium.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
-------------------------- [ERROR MESSAGE] ---------------------------
<stdin>:1:10: fatal error: sodium.h: No such file or directory
compilation terminated.
--------------------------------------------------------------------
ERROR: configuration failed for package ‘sodium’
* removing ‘/root/R/x86_64-pc-linux-gnu-library/4.1/sodium’
* installing *source* package ‘RSQLite’ ...
** package ‘RSQLite’ successfully unpacked and MD5 sums checked
** using staged installation
** libs

###### Various Download info #########

The downloaded source packages are in
    ‘/tmp/Rtmp9w5Zc6/downloaded_packages’
Warning messages:
1: In install.packages("shinymanager", dependencies = T) :
  installation of package ‘sodium’ had non-zero exit status
2: In install.packages("shinymanager", dependencies = T) :
  installation of package ‘keyring’ had non-zero exit status

更新

不可避免地,我能够得到shinymanager下载无论我相信libpath是不正确的。我相信我需要改变它从/root/R/x86_64-pc-linux-gnu-library/4.1/usr/local/lib/R/site-library

tv6aics1

tv6aics11#

我希望我能给予确切的解决方案,但我知道为什么它最终工作。我尝试了各种install.packages()指定libpath和依赖关系。然后我遇到了同样的问题与RSQLite,并最终工作后,它失败了许多尝试和组合。

相关问题