我正在尝试在R中安装软件包caret
一段时间,我收到此错误消息:
*installing *source* package ‘minqa’ ...
** package ‘minqa’ successfully unpacked and MD5 sums checked
** libs
gfortran -fpic -g -O2 -c altmov.f -o altmov.o
make: gfortran: Command not found
make: *** [altmov.o] Error 127
/usr/lib64/R/etc/Makeconf:155: recipe for target 'altmov.o' failed
ERROR: compilation failed for package ‘minqa’
* removing ‘/home/mohammad/R/x86_64-pc-linux-gnu-library/3.3/minqa’
Warning in install.packages :
installation of package ‘minqa’ had non-zero exit status
* installing *source* package ‘SparseM’ ...
** package ‘SparseM’ successfully unpacked and MD5 sums checked
** libs
gfortran -fpic -g -O2 -c bckslv.f -o bckslv.o
make: gfortran: Command not found
/usr/lib64/R/etc/Makeconf:155: recipe for target 'bckslv.o' failed
make: *** [bckslv.o] Error 127
ERROR: compilation failed for package ‘SparseM’
* removing ‘/home/mohammad/R/x86_64-pc-linux-gnu-library/3.3/SparseM’
Warning in install.packages :
installation of package ‘SparseM’ had non-zero exit status
ERROR: dependency ‘minqa’ is not available for package ‘lme4’
* removing ‘/home/mohammad/R/x86_64-pc-linux-gnu-library/3.3/lme4’
Warning in install.packages :
installation of package ‘lme4’ had non-zero exit status
ERROR: dependency ‘SparseM’ is not available for package ‘quantreg’
* removing ‘/home/mohammad/R/x86_64-pc-linux-gnu-library/3.3/quantreg’
Warning in install.packages :
installation of package ‘quantreg’ had non-zero exit status
ERROR: dependency ‘lme4’ is not available for package ‘pbkrtest’
* removing ‘/home/mohammad/R/x86_64-pc-linux-gnu-library/3.3/pbkrtest’
Warning in install.packages :
installation of package ‘pbkrtest’ had non-zero exit status
ERROR: dependencies ‘pbkrtest’, ‘quantreg’ are not available for package ‘car’
* removing ‘/home/mohammad/R/x86_64-pc-linux-gnu-library/3.3/car’
Warning in install.packages :
installation of package ‘car’ had non-zero exit status
ERROR: dependency ‘car’ is not available for package ‘caret’
* removing ‘/home/mohammad/R/x86_64-pc-linux-gnu-library/3.3/caret’
Warning in install.packages :
installation of package ‘caret’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpVBZAgE/downloaded_packages’
现在根据部分帖子,我尝试分别安装minqa
,SparseM
,lme4
,car
...它安装不正确。我怀疑的主要问题是我的archlinux中没有gfortran
库。我尝试使用pacman在arch存储库中找到包gfortran
。它不在那里,所以最后我只是卡住了。有没有人有解决方案或以前遇到过这个问题。谢谢。
答案 0 :(得分:3)
我有类似的问题。对于有此问题的其他人,这是您需要安装的软件包。它是gcc-fortran 6.2.1-1
安装它:
sudo pacman -S gcc-fortran