安装软件包不起作用:权限被拒绝 [英] Install packages does not work: Permission denied

查看:343
本文介绍了安装软件包不起作用:权限被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在努力安装软件包"psych".

I'm struggling to install the package "psych".

我开始使用命令install.packages("psych").下载开始,结果如下:

I started to use the command install.packages("psych"). The download started and the result was the following:

Installing package into ‘C:/Users/Username/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
also installing the dependency ‘mnormt’

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/mnormt_1.5-5.zip'
Content type 'application/zip' length 373388 bytes (364 KB)
downloaded 364 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/psych_1.8.4.zip'
Content type 'application/zip' length 5741178 bytes (5.5 MB)
downloaded 5.5 MB

Error in install.packages : cannot open file 'C:/Users/Username/Documents/R/win-library/3.5/file41147bc27f90/mnormt/CITATION': Permission denied

之后,我搜索了结果.我禁用了防火墙.我也以管理员权限启动了RStudio.建议将软件包安装在R(而不是R Studio)中

After that I searched for results. I disabled my firewall. Also I started RStudio with admin rights. A Suggestion was to install the package in R (not R Studio)

我尝试再次安装它.结果如下:

There I tried to install it again. The outcome was the following:

Installing package into ‘C:/Users/Username/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
also installing the dependency ‘mnormt’

trying URL 'https://cran.uni-muenster.de/bin/windows/contrib/3.5/mnormt_1.5-5.zip'
Content type 'application/zip' length 373388 bytes (364 KB)
downloaded 364 KB

trying URL 'https://cran.uni-muenster.de/bin/windows/contrib/3.5/psych_1.8.4.zip'
Content type 'application/zip' length 5741178 bytes (5.5 MB)
downloaded 5.5 MB

Error in unzip(zipname, exdir = dest) : 
  cannot open file 'C:/Users/Username/Documents/R/win-library/3.5/file40fc713ca07/mnormt/CITATION': Permission denied

您还有其他解决办法吗?压缩程序有问题吗?

Do you have any other idea how to fix that? Is there something wrong with the unzip-program?

推荐答案

你能做.libPaths()吗?

也许.libPaths()没有映射正确的位置(如果您不是管理员)

Maybe the .libPaths() doesnt map the correct location (if you are not the administrator)

尝试.libPaths(.libPaths()[2]),然后再次尝试.

Try .libPaths(.libPaths()[2]) then try install.packages("psych") again.

这篇关于安装软件包不起作用:权限被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆