安装R的包tseries时遇到错误。
以下是错误。重点可能是“gfortran:没有这样的文件或目录”。你是如何解决的?
> install.packages("tseries")
there is a binary version,but a source version:
binary source needs_compilation
tseries 0.10-41 0.10-42 TRUE
Do you want to install from sources the package which needs compilation?
y/n: y
install source‘tseries’
试开URL’https://mirror.lzu.edu.cn/CRAN/src/contrib/tseries_0.10-42.tar.gz'
Content type 'application/octet-stream' length 164529 bytes (160 KB)
==================================================
downloaded 160 KB
* installing *source* package ‘tseries’ ...
** 成功将‘tseries’程序包解包并MD5和检查
** libs
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c arma.c -o arma.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c bdstest.c -o bdstest.o
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c boot.c -o boot.o
gfortran -fPIC -g -O2 -c dsumsl.f -o dsumsl.o
make: gfortran: No such file or directory
make: *** [dsumsl.o] Error 1
ERROR: compilation failed for package ‘tseries’
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/tseries’
packages in
‘/private/var/folders/md/8kgtqqz12j94hbcvhqz0w7gw0000gp/T/Rtmp3nng81/downloaded_packages’
Warning message:
In install.packages("tseries") : when installing ‘tseries’,value of return status is not 0
>
我的mac中的R版本
版本 _
平台x86_64-apple-darwin15.6.0
拱x86_64
os darwin15.6.0
system x86_64,darwin15.6.0
状态
专业3 小4.0 2017年
年 月04日 第21天 svn rev 72570
语言R
version.string R版本3.4.0(2017-04-21) 昵称你愚蠢的黑暗