Can';在Ubuntu 18.04上的R Studio服务器上安装aws.s3软件包-权限被拒绝?
我在Ubuntu 18.04,EC2机器上 请指导我如何启用R Studio Server来安装aws.s3软件包 以下是我正在做的:Can';在Ubuntu 18.04上的R Studio服务器上安装aws.s3软件包-权限被拒绝?,r,ubuntu,package,privileges,rstudio-server,R,Ubuntu,Package,Privileges,Rstudio Server,我在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/是我的非根挂载250GB磁盘 以下是错
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/
是我的非根挂载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的访问以实际安装此软件包?找到了!
发生这种情况的原因是拥有该文件的用户错误
以下是我所做的并解决了这个问题,希望它能帮助其他人:
sudo chown your_user_name .aws/credentials