-1

I'm trying to install the package 'gfortran' (because the package 'deSolve' demands it to be insatlled) but get the error:

install.packages("gfortran")
Warning in install.packages :
  package 'gfortran' is not available (for R version 3.3.1)

How can I solve it?

Phil
  • 7,287
  • 3
  • 36
  • 66
Cranjis
  • 1,590
  • 8
  • 31
  • 64
  • 4
    What OS are you using? gfortran is a system package - not an R package. Basically you need a fortran compiler on your system (and findable via your system path). – Dason Oct 02 '18 at 14:51
  • @Dason I am using MacOS High Sierra 10.13.6... so what do I need to do? Thanks! – Cranjis Oct 02 '18 at 16:12
  • I'm not a Mac user so I'm not sure. Xcode maybe? I think that solves some of these issues but it's been years since I've tinkered with Macs so that could be an out of date recommendation. But basically you need to get a Fortran compiler on your path. – Dason Oct 02 '18 at 16:24
  • @Dason any idea on how to do it? I really know nothing in this issues – Cranjis Oct 09 '18 at 08:55
  • Xcode maybe. That's all I could suggest. That and googling gfortran for mac – Dason Oct 09 '18 at 12:39
  • @Dason what do you mean by Xcode? – Cranjis Oct 09 '18 at 12:43
  • A search engine is your best friend. – Dason Oct 09 '18 at 13:25
  • @Dason I tried but still doesn't work https://stackoverflow.com/questions/52722733/cant-install-desolve-pacakge-in-r – Cranjis Oct 09 '18 at 13:51

1 Answers1

0

You should install gfortran on your device, not in the R console. The steps you should take are nicely written here. In short,

  1. Remove existing gfortran installations

  2. Install Xcode from the App Store

  3. Run in your terminal:

    xcode-select --install
    
  4. Install gfortran. You can find all releases here

  5. Go back to R and install your desired package

Paul Roub
  • 36,322
  • 27
  • 84
  • 93
Bianca
  • 1
  • 2