首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安装r包代码工具时出错

安装r包代码工具时出错
EN

Stack Overflow用户
提问于 2015-09-06 06:07:47
回答 1查看 2.2K关注 0票数 2

我试图更新代码工具包并得到相同的错误:我使用update.package()或install.package(),如下所示。任何见解都值得赞赏:

代码语言:javascript
复制
R> install.packages("codetools", lib = "/usr/lib/R/library")
trying URL 'https://cran.rstudio.com/src/contrib/codetools_0.2-14.tar.gz'
Content type 'application/x-gzip' length 12938 bytes (12 KB)
==================================================
downloaded 12 KB

* installing *source* package ‘codetools’ ...
** package ‘codetools’ successfully unpacked and MD5 sums checked
mv: cannot move ‘/usr/lib/R/library/codetools’ to ‘/usr/lib/R/library/00LOCK-codetools/codetools’: Permission denied
Warning in file.copy(f, instdir, TRUE) : problem copying ./NAMESPACE to /usr/lib/R/library/codetools/NAMESPACE: Permission denied
Warning in file(file, ifelse(append, "a", "w")) : cannot open file '/usr/lib/R/library/codetools/DESCRIPTION': Permission denied
Error in file(file, ifelse(append, "a", "w")) : cannot open the connection
ERROR: installing package DESCRIPTION failed for package ‘codetools’
* removing ‘/usr/lib/R/library/codetools’
Warning in install.packages : installation of package ‘codetools’ had non-zero exit status

The downloaded source packages are in
‘/tmp/RtmpiJWb8L/downloaded_packages’
Updating HTML index of packages in '.Library'
Warning in install.packages : cannot create file '/usr/share/R/doc/html/packages.html', reason 'Permission denied'
Warning in install.packages : cannot update HTML package index
EN

回答 1

Stack Overflow用户

发布于 2015-09-06 06:11:23

权限被拒绝,听起来好像您没有该系统的管理员权限。尝试以根用户身份运行R(或使用sudo),然后查看它是否有效。

票数 5
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/32420581

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档