【问题标题】:R studio packages on mojave have 'non-zero exit status'mojave 上的 R studio 包具有“非零退出状态”
【发布时间】:2020-07-08 05:08:56
【问题描述】:

我已经有一段时间没有使用 R 了。现在我需要再次使用它,同时我更新到 mac os mojave。此外,bioconductor 显然在他们的装置中进行了转换,我们现在必须使用 biocmanager 而不是 bioclite。无论如何,我遇到了几个安装错误,不知道该怎么办。我刚刚下载了 xcode,希望这是问题所在,但我仍然收到以下错误:

> library(DESeq2)
Fehler: package or namespace load failed for ‘DESeq2’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
 es gibt kein Paket namens ‘Hmisc’
> install.packages("Hmisc")
also installing the dependencies ‘acepack’, ‘data.table’

Warning in install.packages :
  unable to access index for repository https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6:
  kann URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/PACKAGES' nicht öffnen
Packages which are only available in source form, and may need compilation
  of C/C++/Fortran: ‘acepack’ ‘data.table’ ‘Hmisc’
Do you want to attempt to install these from sources? (Yes/no/cancel) yes
installing the source packages ‘acepack’, ‘data.table’, ‘Hmisc’

versuche URL 'https://cran.rstudio.com/src/contrib/acepack_1.4.1.tar.gz'
Content type 'application/x-gzip' length 34848 bytes (34 KB)
==================================================
downloaded 34 KB

versuche URL 'https://cran.rstudio.com/src/contrib/data.table_1.12.8.tar.gz'
Content type 'application/x-gzip' length 4948391 bytes (4.7 MB)
==================================================
downloaded 4.7 MB

versuche URL 'https://cran.rstudio.com/src/contrib/Hmisc_4.4-0.tar.gz'
Content type 'application/x-gzip' length 744545 bytes (727 KB)
==================================================
downloaded 727 KB

* installing *source* package ‘acepack’ ...
** Paket ‘acepack’ erfolgreich entpackt und MD5 Summen überprüft
** using staged installation
** libs
gfortran  -fPIC  -Wall -g -O2  -c ace.f -o ace.o
make: gfortran: No such file or directory
make: *** [ace.o] Error 1
ERROR: compilation failed for package ‘acepack’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/acepack’
Warning in install.packages :
  installation of package ‘acepack’ had non-zero exit status
* installing *source* package ‘data.table’ ...
** Paket ‘data.table’ erfolgreich entpackt und MD5 Summen überprüft
** using staged installation
zlib 1.2.8 is available ok
** libs
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fopenmp -fPIC  -Wall -g -O2  -c assign.c -o assign.o
clang: error: unsupported option '-fopenmp'
make: *** [assign.o] Error 1
ERROR: compilation failed for package ‘data.table’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/data.table’
Warning in install.packages :
  installation of package ‘data.table’ had non-zero exit status
ERROR: dependencies ‘acepack’, ‘data.table’ are not available for package ‘Hmisc’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Hmisc’
Warning in install.packages :
  installation of package ‘Hmisc’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/7y/tklmw3f51rz8292j144_70680000gn/T/RtmpacLY8N/downloaded_packages’

有人可以帮忙吗?提前谢谢!

【问题讨论】:

    标签: r macos rstudio macos-mojave bioconductor


    【解决方案1】:

    我在我的笔记本电脑上运行 Mojave,我可以使用 this guide 来运行。

    尝试按照该指南中的步骤操作。

    但是,我不得不使用稍微不同的Makevars 文件,因为我没有使用最新的操作系统。

    这是我的~/.R/Makevars 文件的内容。

    CFLAGS=-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
    CCFLAGS=-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
    CXXFLAGS=-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
    CPPFLAGS=-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include
    
    CXX14 = /usr/local/clang7/bin/clang++ -stdlib=libc++ -nostdinc++ -I/usr/local/clang7/include/c++/v1
    SHLIB_CXX14LD = /usr/local/clang7/bin/clang++ -L/usr/local/clang7/lib
    
    FLIBS=""
    F77="/usr/local/gfortran/bin/gfortran"
    FC="/usr/local/gfortran/bin/gfortran"
    

    【讨论】:

    • 谢谢。不过没有成功。将所有行添加到 makevars 文件后,它会显示“权限被拒绝”
    • 你在用brew吗?试试brew doctor
    【解决方案2】:

    尝试转到 R 首选项 > 包并取消选中“使用 HTTP 安全下载方法”,看起来这是无法打开 URL 的默认参数。

    【讨论】:

      【解决方案3】:

      已修复!

      我可以通过在终端中输入以下内容来解决此问题:

      brew update && brew reinstall r
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2013-06-22
        • 2020-04-15
        • 2020-10-17
        • 2015-09-15
        • 1970-01-01
        • 1970-01-01
        • 2016-08-24
        相关资源
        最近更新 更多