帮小师妹跨操作系统安装一个R包叫devtools,

cran上只有Windows和OS

装R包(package)error:(as ‘lib’ is unspecified)installation of package had non-zero exit status

情况如下:

在本机上可以安装(Windows)

但是在超算平台上无法安装,平台系统为red hat(基于Linux)

给出的error为

Installing package into ‘~:/path/’
(as ‘lib’ is unspecified)

以及installation of package had non-zero exit status

解决办法如下:

下文均在中执行

在本地(自己电脑安装好该包)和服务器的Rstudio中

运行

(.libPaths())

根据本地Rstudio给出的路径找到该包。将整个文件夹copy到Linux平台的路径下

刷新Rstudio

执行

library(devtools)

 OK

装R包(package)error:(as ‘lib’ is unspecified)installation of package had non-zero exit status

感觉这是一个万能的方法,欢迎交流!

 

相关文章:

  • 2022-12-23
  • 2021-07-25
  • 2021-09-15
  • 2021-05-24
  • 2021-12-07
猜你喜欢
  • 2022-01-15
  • 2022-12-23
  • 2021-08-27
  • 2022-01-02
  • 2022-12-23
  • 2021-07-04
  • 2022-01-04
相关资源
相似解决方案