[英]error while installing vegan in r
當我嘗試使用install.packages("vegan")
並使用 RStudio 安裝 vegan 時,我收到以下錯誤消息
* installing *source* package ‘vegan’ ...
** package ‘vegan’ successfully unpacked and MD5 sums checked
** libs
gfortran -fpic -g -O2 -fstack-protector-strong -c cepin.f -o cepin.o
/bin/bash: gfortran: command not found
/usr/lib/R/etc/Makeconf:157: recipe for target 'cepin.o' failed
make: *** [cepin.o] Error 127
ERROR: compilation failed for package ‘vegan’
* removing ‘/home/stephy/R/x86_64-pc-linux-gnu-library/3.2/vegan’
Warning in install.packages :
installation of package ‘vegan’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpoFztoS/downloaded_packages’
您需要安裝 GFortran 並確保它在您的 PATH 中。
您可以從這里為您的操作系統下載它的二進制文件:
https://gcc.gnu.org/wiki/GFortranBinaries
由於您在下載后使用的是 Linux,因此您可以像這樣安裝它:
tar -xzvf gfortran-4.5-linux-i686.tar.gz -C /
然后將其添加到您的 PATH 中,然后再次嘗試安裝vegan
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.