我正在尝试在我的Ubuntu机器上安装tydir R软件包(v.16.04.3 LTS)。我使用的是R版本3.4.2。
> install.packages("tidyr")
Installing package into '/home/rus/R/x86_64-pc-linux-gnu-library/3.4'
(as 'lib' is unspecified)
also installing the dependencies 'purrr', 'tidyselect'
trying URL 'https://cran.rstudio.com/src/contrib/purrr_0.2.3.tar.gz'
Error in download.file(url, destfile, method, mode = "wb", ...) :
cannot open URL 'https://cran.rstudio.com/src/contrib/purrr_0.2.3.tar.gz'
trying URL 'https://cran.rstudio.com/src/contrib/tidyselect_0.2.2.tar.gz'
Content type 'application/x-gzip' length 21101 bytes (20 KB)
==================================================
downloaded 20 KB
trying URL 'https://cran.rstudio.com/src/contrib/tidyr_0.7.2.tar.gz'
Content type 'application/x-gzip' length 369542 bytes (360 KB)
==================================================
downloaded 360 KB
ERROR: dependency 'purrr' is not available for package 'tidyselect'
* removing '/home/rus/R/x86_64-pc-linux-gnu-library/3.4/tidyselect'
ERROR: dependencies 'purrr', 'tidyselect' are not available for package 'tidyr'
* removing '/home/rus/R/x86_64-pc-linux-gnu-library/3.4/tidyr'
The downloaded source packages are in
'/tmp/RtmpWFaW85/downloaded_packages'
>
似乎问题是由purr包引起的。我在Windows 10计算机上做了同样的事情,一切正常。到目前为止我看到的唯一区别是版本。在Linux上,它正在尝试安装purr_0.2.3并在Windows中安装purr_0.2.4
> install.packages("purrr")
Installing package into '/home/rus/R/x86_64-pc-linux-gnu-library/3.4'
(as 'lib' is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/purrr_0.2.3.tar.gz'
Error in download.file(url, destfile, method, mode = "wb", ...) :
cannot open URL 'https://cran.rstudio.com/src/contrib/purrr_0.2.3.tar.gz'
知道如何解决这个问题吗?