我在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服务器的访问以实际安装此软件包?
答案 0 :(得分:1)
发现了! 发生这种情况是由于用户拥有该文件的错误。
这是我所做的并解决了该问题的方法,希望对您有所帮助:
sudo chown your_user_name .aws/credentials