gpt4 book ai didi

r - 在 r 中安装素食主义者时出错

转载 作者:行者123 更新时间:2023-12-05 03:10:26 26 4
gpt4 key购买 nike

当我尝试使用 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

关于r - 在 r 中安装素食主义者时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39970885/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com