安装'时出错;预测';R版本3.3.2中的程序包
正在尝试在MacOS Sierra上安装R版本3.3.2中的“forecast”软件包,如下所示:安装'时出错;预测';R版本3.3.2中的程序包,r,macos,forecasting,install.packages,R,Macos,Forecasting,Install.packages,正在尝试在MacOS Sierra上安装R版本3.3.2中的“forecast”软件包,如下所示: install.packages("forecast") 犯了一大堆我不明白的错误。首先,它从中下载所有依赖项包。我得到的第一个错误是: * installing *source* package ‘quadprog’ ... ** package ‘quadprog’ successfully unpacked and MD5 sums checked ** libs gfortran -ar
install.packages("forecast")
犯了一大堆我不明白的错误。首先,它从中下载所有依赖项包。我得到的第一个错误是:
* installing *source* package ‘quadprog’ ...
** package ‘quadprog’ successfully unpacked and MD5 sums checked
** libs
gfortran -arch x86_64 -fPIC -g -O2 -c aind.f -o aind.o
make: gfortran: No such file or directory
make: *** [aind.o] Error 1
ERROR: compilation failed for package ‘quadprog’
* removing ‘/Users/ekorne201/Library/R/3.3/library/quadprog’
然后,它将转到:
* installing *source* package ‘fracdiff’ ...
** package ‘fracdiff’ successfully unpacked and MD5 sums checked
然后它说:
ld: warning: directory not found for option '-L/Users/Shared/Jenkins/workspace/External-R-3.3.2/vendor/build/lib'
ld: warning: directory not found for option '-L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3/x86_64'
ld: warning: directory not found for option '-L/usr/local/lib/x86_64'
ld: warning: directory not found for option '-L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [fracdiff.so] Error 1
ERROR: compilation failed for package ‘fracdiff’
* removing ‘/Users/ekorne201/Library/R/3.3/library/fracdiff’
对“lmtest”和“RcppArmadillo”执行相同的操作,之后以以下内容结束:
ERROR: dependencies ‘tseries’, ‘fracdiff’, ‘lmtest’, ‘RcppArmadillo’ are not available for package ‘forecast’
* removing ‘/Users/ekorne201/Library/R/3.3/library/forecast’
The downloaded source packages are in
‘/private/var/folders/8p/54qnlb9x7bj8syz631_d58t92rmkyp/T/Rtmp246ipQ/downloaded_packages’
Warning messages:
1: In install.packages("forecast") :
installation of package ‘quadprog’ had non-zero exit status
2: In install.packages("forecast") :
installation of package ‘fracdiff’ had non-zero exit status
3: In install.packages("forecast") :
installation of package ‘lmtest’ had non-zero exit status
4: In install.packages("forecast") :
installation of package ‘RcppArmadillo’ had non-zero exit status
5: In install.packages("forecast") :
installation of package ‘tseries’ had non-zero exit status
6: In install.packages("forecast") :
installation of package ‘forecast’ had non-zero exit status
我被困在如何继续的问题上,非常感谢你的建议。我也遇到了同样的错误。我通过安装
gfortran
解决了这个问题。在macOS中,我可以这样做
brew install gcc
install.packages("forecast")
在R中,这样
brew install gcc
install.packages("forecast")
所以
>库(预测);合身
蝙蝠(0.566,{0,2},-)
呼叫:tbats(y=UScitiesD)
参数
Lambda:0.565592
阿尔法:0.2166945
MA系数:-0.130506-0.511551
种子国家:
[,1]
[1,] 90.10291
[2,] 0.00000
[3,] 0.00000
西格玛:27.61468
AIC:761.9238
如注释中所述,其他方法是从安装
相关的
您需要gfortran库或任何为您的操作系统调用的库。也许会有帮助。谢谢!供大家参考,在这里: