R软件包“ DistributionUtils”安装错误

问题描述 投票:0回答:1

我尝试通过以下方式安装“ DistributionUtils”软件包(在Mac上为:)>

install.packages("DistributionUtils")

系统询问我是否要从源代码安装它们。我回答“是”(注意:回答“否”时,代码不会继续进行安装)。然后,发生以下错误(请参见下面的完整代码):

make: *** [IncompleteBessel.o] Error 1 ERROR: compilation failed for package ‘DistributionUtils’

两个问题:

  • (Q1)为什么会发生错误?
  • (Q2)如何交替安装软件包?
  • 感谢您的帮助。请在下面找到完整的执行代码:

install.packages("DistributionUtils")
Warning in install.packages :
  unable to access index for repository https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6:
  cannot open URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/PACKAGES'
Package which is only available in source form, and may need compilation of C/C++/Fortran:
  ‘DistributionUtils’
Do you want to attempt to install these from sources? (Yes/no/cancel) Yes
installing the source package ‘DistributionUtils’

trying URL 'https://cran.rstudio.com/src/contrib/DistributionUtils_0.6-0.tar.gz'
Content type 'application/x-gzip' length 41231 bytes (40 KB)
==================================================
downloaded 40 KB

* installing *source* package ‘DistributionUtils’ ...
** package ‘DistributionUtils’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
gfortran  -fPIC  -Wall -g -O2  -c IncompleteBessel.f -o IncompleteBessel.o
make: gfortran: No such file or directory
make: *** [IncompleteBessel.o] Error 1
ERROR: compilation failed for package ‘DistributionUtils’
* removing    ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/DistributionUtils’
Warning in install.packages :
installation of package ‘DistributionUtils’ had non-zero exit status

The downloaded source packages are in
       ‘/private/var/folders/pp/nll33qgs6w52y4bkhjdxvvdh0000gn/T/RtmpTZoRq5/downloaded_packages’

我尝试通过install.packages(“ DistributionUtils”)安装“ DistributionUtils”软件包(在Mac上),询问是否要从源代码安装这些软件包。我回答“是”(注意:当回答“ ...

r install.packages
1个回答
0
投票
(Q1)为什么会发生错误?
© www.soinside.com 2019 - 2024. All rights reserved.