在 MacOSX Monterey 的 R 中安装 lme4 包时出现错误

2023-12-25

我在尝试安装时收到以下错误lme4R 中的包。

install.packages("lme4")
Installing package into ‘/usr/local/lib/R/4.2/site-library’
(as ‘lib’ is unspecified)
also installing the dependency ‘minqa’

trying URL 'https://cloud.r-project.org/src/contrib/minqa_1.2.4.tar.gz'
Content type 'application/x-gzip' length 53548 bytes (52 KB)
==================================================
downloaded 52 KB

trying URL 'https://cloud.r-project.org/src/contrib/lme4_1.1-29.tar.gz'
Content type 'application/x-gzip' length 3306026 bytes (3.2 MB)
==================================================
downloaded 3.2 MB

* installing *source* package ‘minqa’ ...
** package ‘minqa’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
/usr/local/opt/gcc/bin/gfortran -fno-optimize-sibling-calls  -fPIC  -g -O2  -c altmov.f -o altmov.o
altmov.f:42:72:

   42 |    10 HCOL(K)=ZERO
      |                                                                        1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 10 at (1)
altmov.f:45:72:

   45 |       DO 20 K=1,NPT
      |                                                                        1
Warning: Fortran 2018 deleted feature: Shared DO termination label 20 at (1)
altmov.f:46:72:

   46 |    20 HCOL(K)=HCOL(K)+TEMP*ZMAT(K,J)
      |                                                                        1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 20 at (1)
altmov.f:53:72:

   53 |    30 GLAG(I)=BMAT(KNEW,I)
      |                                                                        1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 30 at (1)
altmov.f:57:72:

   57 |    40 TEMP=TEMP+XPT(K,J)*XOPT(J)
      |                                                                        1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 40 at (1)
altmov.f:59:72:

   59 |       DO 50 I=1,N
      |                                                                        1
Warning: Fortran 2018 deleted feature: Shared DO termination label 50 at (1)
altmov.f:60:72:

   60 |    50 GLAG(I)=GLAG(I)+TEMP*XPT(K,I)
      |                                                                        1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 50 at (1)
altmov.f:76:72:

   76 |    60 DISTSQ=DISTSQ+TEMP*TEMP
      |                                                                        1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 60 at (1)
altmov.f:172:72:

  172 |    90 XNEW(I)=DMAX1(SL(I),DMIN1(SU(I),TEMP))
      |                                                                        1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 90 at (1)
altmov.f:237:72:

  237 |   140 GW=GW+GLAG(I)*W(I)
      |                                                                        1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 140 at (1)
altmov.f:248:72:

  248 |   150 TEMP=TEMP+XPT(K,J)*W(J)
      |                                                                        1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 150 at (1)
altmov.f:249:72:

  249 |   160 CURV=CURV+HCOL(K)*TEMP*TEMP
      |                                                                        1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 160 at (1)
altmov.f:255:72:

  255 |   170     XALT(I)=DMAX1(SL(I),DMIN1(SU(I),TEMP))
      |                                                                        1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 170 at (1)
altmov.f:268:72:

  268 |   180     W(N+I)=XALT(I)
      |                                                                        1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 180 at (1)
altmov.f:275:72:

  275 |   190     XALT(I)=W(N+I)
      |                                                                        1
Warning: Fortran 2018 deleted feature: DO termination statement which is not END DO or CONTINUE with label 190 at (1)
clang (LLVM option parsing): Unknown command line argument '-x86-pad-for-align=false'.  Try: 'clang (LLVM option parsing) --help'
clang (LLVM option parsing): Did you mean '--x86-slh-loads=false'?
make: *** [altmov.o] Error 1
ERROR: compilation failed for package ‘minqa’
* removing ‘/usr/local/lib/R/4.2/site-library/minqa’
ERROR: dependency ‘minqa’ is not available for package ‘lme4’
* removing ‘/usr/local/lib/R/4.2/site-library/lme4’

The downloaded source packages are in
    ‘/private/var/folders/02/6dwz1gvd1qz4gml8v_wv6n980000gp/T/RtmpVREiYV/downloaded_packages’
Warning messages:
1: In install.packages("lme4") :
  installation of package ‘minqa’ had non-zero exit status
2: In install.packages("lme4") :
  installation of package ‘lme4’ had non-zero exit status

我最近将 MacBook 2020(英特尔芯片)中的操作系统升级到了 MacOS Monterey (12.3.1)。

我已尝试重新安装gcc and gccfortran using brew没有效果。

谁能帮我解决这个问题吗?


去除xcode命令行工具并重新安装它解决了这个问题。

$ xcode-select --print-path
/Library/Developer/CommandLineTools
$ sudo rm -r -f /Library/Developer/CommandLineTools
$ xcode-select --install
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

在 MacOSX Monterey 的 R 中安装 lme4 包时出现错误 的相关文章

随机推荐