title: R package installation: ld: warning: directory not found for option '-L/usr/local/gfortran/lib'
body: <p>I am trying to install an R package from source:</p>
  
  <p><a href="https://cran.r-project.org/src/contrib/Archive/igraph/igraph_1.2.4.tar.gz" rel="nofollow noreferrer">igraph</a></p>
  
  <p>Here is my command:</p>
  
  <pre><code>install.packages('igraph_1.2.4.tar.gz', repos = NULL, type="source")
  </code></pre>
  
  <p>But I am getting the following error:</p>
  
  <pre><code>ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0'
  ld: warning: directory not found for option '-L/usr/local/gfortran/lib'
  ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0'
  ld: warning: directory not found for option '-L/usr/local/gfortran/lib'
  ld: library not found for -lgfortran
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  make: *** [igraph.so] Error 1
  ERROR: compilation failed for package ‘igraph’
  * removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/igraph’
  * restoring previous ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/igraph’
  </code></pre>