在Windows上离线安装R软件包'rgdal'及其外部依赖项

时间:2020-05-05 07:05:31

标签: r package installation offline rgdal

我的笔记本电脑无法访问互联网,我正在尝试下载软件包rgdal。

我已经下载了rgdal_1.4-8.tar.gz,gdal-3.0.4.tar.gz和proj-6.3.2.tar.gz。我尝试使用以下方式分别通过源安装它们:

install.packages('... / ... tar.gz',type ='source',repos = NULL)

但是它不起作用。这是错误消息

ERROR: cannot extract package from 'D:/Users/sn/Documents/R source packages/gdal-3.0.4.tar.gz'
Warning in install.packages :
  installation of package ‘D:/Users/sn/Documents/R source packages/gdal-3.0.4.tar.gz’ had non-zero exit status
ERROR: cannot extract package from 'D:/Users/sn/Documents/R source packages/proj-6.3.2.tar.gz'
Warning in install.packages :
  installation of package ‘D:/Users/sn/Documents/R source packages/proj-6.3.2.tar.gz’ had non-zero exit status
Error in download.file(sprintf("https://github.com/rwinlib/gdal2/archive/v%s.zip",  :
  cannot open URL 'https://github.com/rwinlib/gdal2/archive/v2.2.3.zip'
In addition: Warning message:
In download.file(sprintf("https://github.com/rwinlib/gdal2/archive/v%s.zip",  :
  InternetOpenUrl failed: 'A connection with the server could not be established'
Execution halted
make: *** [Makevars.win:27: winlibs] Error 1
ERROR: compilation failed for package 'rgdal'
* removing 'D:/Users/sn/Documents/R/win-library/3.6/rgdal'
Warning in install.packages :
  installation of package ‘D:/Users/sn/Documents/R source packages/rgdal_1.4-8.tar.gz’ had non-zero exit status

0 个答案:

没有答案