简体   繁体   中英

error while installing vegan in r

When I tried to install vegan using install.packages("vegan") and using RStudio I am getting the following error message

* 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’

You need to install GFortran and make sure that it is in your PATH.

You can download a binary of it for your OS from here:

https://gcc.gnu.org/wiki/GFortranBinaries

Since you're on Linux after downloading it you can install it like this:

tar -xzvf gfortran-4.5-linux-i686.tar.gz -C / 

Then add it to your PATH then try installing vegan again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM