【问题标题】:Can't install aws.s3 package in R Studio Server on Ubuntu 18.04 - permission denied?无法在 Ubuntu 18.04 上的 R Studio Server 中安装 aws.s3 包 - 权限被拒绝?
【发布时间】:2019-10-18 06:26:55
【问题描述】:

我在 Ubuntu 18.04,EC2 机器上。

请指导我如何启用 R Studio Server 来安装 aws.s3 包。

这是我正在做的事情:

install.packages(c('aws.s3', 'aws.signature'), repos = c('cloudyr' = 'http://cloudyr.github.io/drat'), lib = "/vg1/lv1/R/x86_64-pc-linux-gnu-library/")

vg1/lv1/ 是我的非 root 安装的 250GB 磁盘。

这是错误:

Installing package into ‘/vg1/lv1/R/x86_64-pc-linux-gnu-library/3.6’ (as ‘lib’ is unspecified) also installing the dependency ‘aws.signature’

trying URL 'https://cloud.r-project.org/src/contrib/aws.signature_0.5.0.tar.gz' Content type 'application/x-gzip' length 24939 bytes (24 KB)
================================================== downloaded 24 KB

trying URL 'https://cloud.r-project.org/src/contrib/aws.s3_0.3.12.tar.gz' Content type 'application/x-gzip' length 47424 bytes (46 KB)
================================================== downloaded 46 KB

* installing *source* package ‘aws.signature’ ...
** package ‘aws.signature’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location Warning in file(con, "rb") :   cannot open file '/home/ssolun/.aws/credentials': Permission denied Error: package or namespace load failed for ‘aws.signature’:  .onLoad failed in loadNamespace() for 'aws.signature', details:   call: file(con, "rb")  error: cannot open the connection Error: loading failed Execution halted ERROR: loading failed
* removing ‘/vg1/lv1/R/x86_64-pc-linux-gnu-library/3.6/aws.signature’ Warning in install.packages :   installation of package ‘aws.signature’ had non-zero exit status ERROR: dependency ‘aws.signature’ is not available for package ‘aws.s3’
* removing ‘/vg1/lv1/R/x86_64-pc-linux-gnu-library/3.6/aws.s3’ Warning in install.packages :   installation of package ‘aws.s3’ had non-zero exit status

The downloaded source packages are in   ‘/tmp/RtmpAkWgxm/downloaded_packages’

请指导我如何启用对 R Studio Server 的访问以实际安装此包?

【问题讨论】:

    标签: r ubuntu package privileges rstudio-server


    【解决方案1】:

    发现了! 这是因为错误的用户拥有该文件。

    这是我所做的并解决了这个问题,希望对其他人有所帮助:

    sudo chown your_user_name .aws/credentials 
    

    【讨论】:

      猜你喜欢
      • 2019-11-16
      • 2020-07-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-10-06
      • 2020-01-02
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多