Keep getting errors when trying to instal NicheMapR from Github

Can't instal NicheMapR and I need to use it for my dissertation. Would appreciate the help.

I keep getting this error:

remotes::install_github("mrke/NicheMapR")
Error: Failed to install 'unknown package' from GitHub:
JSON: EXPECTED value GOT EOF

Could yo give us more information about your setup? I can't replicate your issue, that command installs NicheMapR from github in RStudio Cloud (R version 3.6.0) without any problem.

I am using RStudio version 1.2.1335.

what are your R and Operating system versions?

Using a mac osx 10.14 and R 3.6.0.

Do you have xcode installed in your system? You need it for compiling packages on MacOS

xcode-select --install

Here are some installation instructions

Yeah I do and I just updated it. I tried to install nichemapr again and it has now given me the error:

ERROR: compilation failed for package ‘NicheMapR’

  • removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/NicheMapR’
    Error: Failed to install 'NicheMapR' from GitHub:
    (converted from warning) installation of package ‘/var/folders/n5/p2snc78j4tz72ctxyh7b1tyw0000gn/T//RtmpDgflTk/file2c1ad2b5457/NicheMapR_2.1.1.tar.gz’ had non-zero exit status

Could you post the whole error message? you are omitting the useful parts.

remotes::install_github("mrke/NicheMapR")
Downloading GitHub repo mrke/NicheMapR@master
:heavy_check_mark: checking for file ‘/private/var/folders/n5/p2snc78j4tz72ctxyh7b1tyw0000gn/T/RtmpDgflTk/remotes2c1a1b10b9ff/mrke-NicheMapR-cab6823/DESCRIPTION’ ...
─ preparing ‘NicheMapR’:
:heavy_check_mark: checking DESCRIPTION meta-information ...
─ cleaning src
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ looking to see if a ‘data/datalist’ file should be added
─ building ‘NicheMapR_2.1.1.tar.gz’

  • installing source package ‘NicheMapR’ ...
    ** using staged installation
    ** libs
    gfortran -fPIC -Wall -g -O2 -c AACOMMONDAT.f -o AACOMMONDAT.o
    make: gfortran: No such file or directory
    make: *** [AACOMMONDAT.o] Error 1
    ERROR: compilation failed for package ‘NicheMapR’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/NicheMapR’
    Error: Failed to install 'NicheMapR' from GitHub:
    (converted from warning) installation of package ‘/var/folders/n5/p2snc78j4tz72ctxyh7b1tyw0000gn/T//RtmpDgflTk/file2c1ad2b5457/NicheMapR_2.1.1.tar.gz’ had non-zero exit status

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.