“installation of package 'FILE_PATH' had non-zero exit status” in R

前端 未结 9 620
感情败类
感情败类 2020-12-01 09:31

By installing the package in R using the following command:

install.packages(\'FILE_PATH\', repos=NULL, type = \"source\")

I got the follow

相关标签:
9条回答
  • 2020-12-01 10:14

    I was having a similar problem trying to install a package called AED. I tried using the install.packages() command:

    install.packages('FILE_PATH', repos=NULL, type = "source")
    

    but kept getting the following warning message:

    Warning message:
    In install.packages("/Users/blahblah/R-2.14.0/AED",  :
    installation of package ‘/Users/blahblah/R-2.14.0/AED’ had
    non-zero exit status
    

    It turned out the folder 'AED' had another folder inside of it that hadn't been uncompressed. I just uncompressed it and tried installing the package again and it worked.

    0 讨论(0)
  • 2020-12-01 10:19

    I have had the same problem with a specific package in R and the solution was I should install in the ubuntu terminal libcurl. Look at the information that appears above explaining to us that curl package has error installation.

    I knew this about the message:

    Configuration failed because libcurl was not found. Try installing:
     * deb: libcurl4-openssl-dev (Debian, Ubuntu, etc)
     * rpm: libcurl-devel (Fedora, CentOS, RHEL)
     * csw: libcurl_dev (Solaris)
    If libcurl is already installed, check that 'pkg-config' is in your
    PATH and PKG_CONFIG_PATH contains a libcurl.pc file. If pkg-config
    is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
    R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
    

    To install it I used the net command:

    sudo apt-get install libcurl4-openssl-dev

    Sometimes we can not install a specific package in R because we have problems with packages that must be installed previously as curl package. To know if we should install it we should check the warning errors such as: installation of package ‘curl’ had non-zero exit status.

    I hope I have been helpful

    0 讨论(0)
  • 2020-12-01 10:20

    For those of you who are using MacOS and like me perhaps have been circling the internet as to why some R packages do not install here is a possible help.

    If you get a non-zero exit status first check to ensure all dependencies are installed as well. Read through the messaging. If that is checked off, then look for indications such as gfortran: No such a file or directory. That might be due to Apple OS compiler issues that some packages will not install unless you use their binary version. Look for binary zip file in the package cran.r-project.org page, download it and use the following command to get the package installed:

    install.packages("/PATH/zip file ", repos = NULL, type="source")

    0 讨论(0)
提交回复
热议问题