我正在尝试在运行R 3.5.3的R Studio中安装软件包“ bfast”,并且抛出依赖错误Warning in install.packages :
dependency ‘quadprog’ is not available
我尝试使用install.packages("bfast")
安装它,并且当我收到依赖项错误时,我尝试像install.packages("quadprog")
一样单独安装Quadprog依赖项作为软件包,但随后它向我显示了此错误,Warning in install.packages :
package ‘quadprog’ is not available (for R version 3.5.3)
这是安装bfast
软件包时的控制台状态。
install.packages("bfast")
Installing package into ‘/home/rehan/R/x86_64-pc-linux-gnu-library/3.5’
(as ‘lib’ is unspecified)
Warning in install.packages :
dependency ‘quadprog’ is not available
also installing the dependencies ‘tseries’, ‘forecast’
trying URL 'https://cloud.r-project.org/src/contrib/tseries_0.10-46.tar.gz'
Content type 'application/x-gzip' length 164471 bytes (160 KB)
==================================================
downloaded 160 KB
trying URL 'https://cloud.r-project.org/src/contrib/forecast_8.6.tar.gz'
Content type 'application/x-gzip' length 908972 bytes (887 KB)
==================================================
downloaded 887 KB
trying URL 'https://cloud.r-project.org/src/contrib/bfast_1.5.7.tar.gz'
Content type 'application/x-gzip' length 59697 bytes (58 KB)
==================================================
downloaded 58 KB
ERROR: dependency ‘quadprog’ is not available for package ‘tseries’
* removing ‘/home/rehan/R/x86_64-pc-linux-gnu-library/3.5/tseries’
Warning in install.packages :
installation of package ‘tseries’ had non-zero exit status
ERROR: dependency ‘tseries’ is not available for package ‘forecast’
* removing ‘/home/rehan/R/x86_64-pc-linux-gnu-library/3.5/forecast’
Warning in install.packages :
installation of package ‘forecast’ had non-zero exit status
ERROR: dependency ‘forecast’ is not available for package ‘bfast’
* removing ‘/home/rehan/R/x86_64-pc-linux-gnu-library/3.5/bfast’
Warning in install.packages :
installation of package ‘bfast’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpSfjWA6/downloaded_packages’
我如何正确安装具有所有依赖项的软件包?
答案 0 :(得分:1)
我只是遇到了同样的问题。我查看了R从(https://cran.rstudio.com/bin/windows/contrib/3.5/)看的地方,并从那里下载了“ quadprog” zip文件。然后,在R或Rstudio中,您可以从“程序包归档文件”中安装程序包。它对我有用,我希望对您有用。
答案 1 :(得分:0)
有一个新版本的Quadprog:1.5-7,可以安装在3.1以上的R上:https://cran.r-project.org/web/packages/quadprog/index.html 那为我解决了。