为什么无法使用R-Studio安装,而不是在R?

时间:2018-04-23 09:58:18

标签: r package plotly

操作系统:Ubuntu 17.1

我尝试使用install.packages("plotly")

在R studio上安装plotly

以下日志失败:

Installing package into ‘/home/company/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependencies ‘htmlwidgets’, ‘hexbin’, ‘crosstalk’, ‘data.table’

trying URL 'https://cloud.r-project.org/src/contrib/htmlwidgets_1.0.tar.gz'
Warning in install.packages :
  cannot open URL 'https://cloud.r-project.org/src/contrib/htmlwidgets_1.0.tar.gz': HTTP status was '404 Not Found'
Error in download.file(url, destfile, method, mode = "wb", ...) : 
  cannot open URL 'https://cloud.r-project.org/src/contrib/htmlwidgets_1.0.tar.gz'
Warning in install.packages :
  download of package ‘htmlwidgets’ failed
trying URL 'https://cloud.r-project.org/src/contrib/hexbin_1.27.2.tar.gz'
Content type 'application/x-gzip' length 491560 bytes (480 KB)
==================================================
downloaded 480 KB

trying URL 'https://cloud.r-project.org/src/contrib/crosstalk_1.0.0.tar.gz'
Content type 'application/x-gzip' length 563474 bytes (550 KB)
==================================================
downloaded 550 KB

trying URL 'https://cloud.r-project.org/src/contrib/data.table_1.10.4-3.tar.gz'
Content type 'application/x-gzip' length 3071833 bytes (2.9 MB)
==================================================
downloaded 2.9 MB

trying URL 'https://cloud.r-project.org/src/contrib/plotly_4.7.1.tar.gz'
Content type 'application/x-gzip' length 1034951 bytes (1010 KB)
==================================================
downloaded 1010 KB

Warning in install.packages :
  system call failed: Cannot allocate memory
Warning in install.packages :
  installation of package ‘hexbin’ had non-zero exit status
Warning in install.packages :
  system call failed: Cannot allocate memory
Warning in install.packages :
  installation of package ‘crosstalk’ had non-zero exit status
Warning in install.packages :
  system call failed: Cannot allocate memory
Warning in install.packages :
  installation of package ‘data.table’ had non-zero exit status
Warning in install.packages :
  system call failed: Cannot allocate memory
Warning in install.packages :
  installation of package ‘plotly’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/RtmpTFlAaE/downloaded_packages’

由于某种原因,它不能分配内存,但在R中它成功了吗?

这里有什么问题?请告知为什么我不能直接安装它?

1 个答案:

答案 0 :(得分:0)

您应该尝试通过devtools安装/static的开发版本(在GitHub上):

plotly