我正在尝试安装"预测"包装和安装有问题。我尝试了install.packages(" forecast")并收到此错误消息:
*Installing package into ‘C:/Users/DT217/Documents/R/win-library/3.1’
(as ‘lib’ is unspecified)
有二进制版本(将被安装),但源代码版本是后来的:
binary source
forecast 5.8 5.9
also installing the dependencies ‘zoo’, ‘RcppArmadillo’
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.1/zoo_1.7-11.zip'
Warning in install.packages :
cannot open: HTTP status was '404 Not Found'
Error in download.file(url, destfile, method, mode = "wb", ...) :
cannot open URL 'http://cran.rstudio.com/bin/windows/contrib/3.1/zoo_1.7-11.zip'
Warning in install.packages :
download of package ‘zoo’ failed
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.1/RcppArmadillo_0.4.600.4.0.zip'
Warning in install.packages :
cannot open: HTTP status was '404 Not Found'
Error in download.file(url, destfile, method, mode = "wb", ...) :
cannot open URL'http://cran.rstudio.com/bin/windows/contrib/3.1/RcppArmadillo_0.4.600.4.0.zip'
Warning in install.packages :
download of package ‘RcppArmadillo’ failed
trying URL'http://cran.rstudio.com/bin/windows/contrib/3.1/forecast_5.8.zip'
Warning in install.packages :
cannot open: HTTP status was '404 Not Found'
Error in download.file(url, destfile, method, mode = "wb", ...) :
cannot open URL 'http://cran.rstudio.com/bin/windows/contrib/3.1/forecast_5.8.zip'
Warning in install.packages :
download of package ‘forecast’ failed*
我尝试打开错误中提供的网址,但无法打开它。我也尝试过安装" zoo"包并得到类似的错误。但是,我能够安装其他一些软件包,所以有些软件包正在运行。
以下是我正在使用的RStudio版本的信息:
$platform
[1] "x86_64-w64-mingw32"
$arch
[1] "x86_64"
$os
[1] "mingw32"
$system
[1] "x86_64, mingw32"
$status
[1] ""
$major
[1] "3"
$minor
[1] "1.3"
$year
[1] "2015"
$month
[1] "03"
$day
[1] "09"
$`svn rev`
[1] "67962"
$language
[1] "R"
$version.string
[1] "R version 3.1.3 (2015-03-09)"
$nickname
[1] "Smooth Sidewalk"*
这是一篇有类似问题的帖子。任何帮助将不胜感激。提前谢谢!
柔
答案 0 :(得分:5)
解决您问题的最简单方法是尝试选择其他CRAN镜像来下载和安装forecast
软件包。您可以通过选择以下方式手动选择镜像:
Packages -> Set CRAN mirror...
我刚刚使用新加坡镜子跑了install.packages("forecast")
(因为我住在那里),我没有问题。
如果必须继续使用当前镜像,则必须确定无法下载哪些依赖项,并且必须从某处手动获取它们。
答案 1 :(得分:2)
我遇到了同样的问题。命令后:
install.packages("forecast_5.9.tgz")
出现警告: install.packages中的警告: 包'forecast_5.9.tgz'不可用(对于R版本3.1.2)
以下命令有效
install.packages("forecast")
还安装了其他相关软件包。
最佳Swapnil