我在Windows 10 WSL上运行Ubuntu18.04。我最初是按照这个指南安装R3.6的:R-CRAN-Linux-Ubuntu-安装。这个问题与:在安装R包时拒绝权限有关。我正在写一个新的问题,而不是评论前者,因为我没有足够的声誉。我试着遵循那篇文章中唯一答案中的说明,但是卸载R3.6和从默认的ubuntu存储库安装R3.4会导致类似的错误(如下所示)。
最后,我无法使用与ps相同的模式从apt安装r-cran-xml2,因为仿生上不存在这样的包(r-cran-ps)。迪斯科上有r-cran-ps。我试图安装ps,因为它是TSclust的依赖项。
我可以在Windows上运行R3.6,没有任何问题,所以我希望这与WSL Ubuntu有关。欢迎熟悉此错误的其他人的任何建议或推荐信。
~/code/不动产-实验室/R$ sudo -E R R版本3.6.1 (2019-07-05) -“脚趾的行动”版权(C) 2019 R基础统计计算平台: x86_64-pc-linux-gnu (64位)R是免费软件,绝对没有任何保证。欢迎您在某些情况下重新分发。键入'license()‘或’license()‘以获取分发细节。R是一个与许多贡献者协作的项目。输入关于如何在出版物中引用R或R包的更多信息和“引文()”,输入“贡献者()”。在一些演示中输入'demo()‘,为在线帮助输入' help ()’,或者为HTML界面输入'help.start()‘来帮助。键入'q()‘以退出R. > install.packages("ps"),将包安装到’/usr/local/lib/R/site-library‘(未指定’lib‘)尝试URL 'https://cloud.r-project.org/src/contrib/ps_1.3.0.tar.gz’内容类型‘application/x’长度为261887字节(255KB)install.packages下载了255KB*安装源代码包‘ps’.-fdebug-prefix-map=/build/r-base-uuRxut/r-base-3.6.1=. **包‘ps’成功解压缩,MD5和checked **使用staged ** libs gcc -std=gnu99 -g -O2 installation-fstack- -Wformat --Wformat=format-security time -D_FORTIFY_SOURCE=2 -g -Wall px.c -o px gcc -std=gnu99 -I"/usr/share/R/include“-DNDEBUG -fpic -g -O2 -I-fstack- -Wformat --Wformat=format-security time -D_FORTIFY_SOURCE=2 -g -c init.c -o init.o gcc -std=gnu99 -I"/usr/share/R/include“-DNDEBUG -fpic -g -O2 -I-fstack保护程序-强-Wformat -Werror=-Wformat--Wformat- -D_FORTIFY_SOURCE=2 -g -c api-common.c -o api-common.o gcc -std=gnu99 -I“/usr/-Wformat/R/包含”-DNDEBUG -fpic -g -O2 -I“-fstack- -Wformat --Wformat=format-security time -D_FORTIFY_SOURCE=2 -g -c common.c -o common.o gcc -std=gnu99 -I"/usr/share/R/include“-DNDEBUG -fpic -g -O2 -I-fstack- -Wformat --Wformat=format-security -D_FORTIFY_SOURCE=2 -g -c ex.c -o extra.o gcc -std=gnu99 -I“/usr/share/R/包含”-DNDEBUG -fpic -g -O2 -I“-fstack- -Wformat --Wformat=format-security time -D_FORTIFY_SOURCE=2 -g -c dummy.c -o dummy.o gcc -std=gnu99 -I"/usr/share/R/include“-DNDEBUG -fpic -g -O2 -I-fstack- -Wformat --Wformat=format-security time -D_FORTIFY_SOURCE=2 -g -c Pox.c -o posix.o gcc -std=gnu99 -I"/usr/share/R/include“-DNDEBUG -fpic -g -O2 -I-fstack- -Wformat --Wformat-Werror=format--Wformat-time -D_FORTIFY_SOURCE=2 -g -c api-pox.c -o api-posix.o gcc -std=gnu99 -I“/usr/-Wformat/r/include”-DNDEBUG -fpic -g -O2 -I-fstack- -Wformat --Wformat=format-security -D_FORTIFY_SOURCE=2 -g -c linux.c -o linux.o gcc -std=gnu99 -I"/usr/share/R/include“-DNDEBUG -fpic -g -O2 -I-fstackrelro -o ps.so init.o api-common.o common.o exex.o pux.o api--o x.o linux.o api-linux.o -L/usr/lib/R/lib -lR通过'install.libs.R‘安装到-o ** R ** inst **字节-编译并准备用于懒惰loading ** help *安装帮助indices *的包。*构建包indices **测试是否可以从临时的location **检查共享对象中的绝对路径和动态库mv:无法将indices移动到‘/usr/local/lib/R/site-indices’:权限拒绝错误:移到最终位置失败下载的源包位于‘/tmp/rtmpG1GgKd/ loaded _ packages’警告消息: in install.packages("ps")安装软件包‘ps’有非零出口status > q()
发布于 2019-12-23 07:55:14
你试过你提到的相关问题的另一个解决方案了吗?
install.packages("ps", dependencies=TRUE, INSTALL_opts = c('--no-lock'))
请注意,使用sudo安装软件包,虽然是一个快速的解决办法,但在每次要删除或更新在sudo R会话中创建的包时,都会使您不得不退出并重新启动R。
https://askubuntu.com/questions/1170388
复制相似问题