我正在努力安装“psych”包。
我开始使用命令install.packages("psych")
。开始下载,结果如下:
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)中安装该软件包
在那里我尝试再次安装它。结果如下:
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
您还有其他想法如何解决这个问题吗?解压程序有问题吗?
你可以做.libPaths()
?
也许是.libPaths()
未映射正确的位置(如果您不是管理员)
Try .libPaths(.libPaths()[2])
然后尝试install.packages("psych")
again.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)