title: install_github - package not installing
body: <p>I'm trying to install a package but for some reason it refuses to install? The error im getting is</p>
  <pre><code>ERROR: compilation failed for package 'methylclock.'
  
      install_github(&quot;isglobal-brge/methylclock&quot;)
  
  Downloading GitHub repo isglobal-brge/methylclock@HEAD
  These packages have more recent versions available.
  It is recommended to update all of them.
       Which would you like to update?
  
       1: All                                  
       2: CRAN packages only                   
       3: None                                 
       4: matrixStats (0.58.0 -&gt; 0.59.0) [CRAN]
       5: fansi       (0.4.2  -&gt; 0.5.0 ) [CRAN]
       6: tibble      (3.1.1  -&gt; 3.1.2 ) [CRAN]
       7: cachem      (1.0.4  -&gt; 1.0.5 ) [CRAN]
       8: stringi     (1.5.3  -&gt; 1.6.2 ) [CRAN]
       9: rtracklayer (1.49.5 -&gt; 1.50.0) [CRAN]
       10: zip         (2.1.1  -&gt; 2.2.0 ) [CRAN]
  
      Enter one or more numbers, or an empty line to skip updates: 1
      matrixStats (0.58.0 -&gt; 0.59.0) [CRAN]
      fansi       (0.4.2  -&gt; 0.5.0 ) [CRAN]
      tibble      (3.1.1  -&gt; 3.1.2 ) [CRAN]
      cachem      (1.0.4  -&gt; 1.0.5 ) [CRAN] 
      stringi     (1.5.3  -&gt; 1.6.2 ) [CRAN]
      rtracklayer (1.49.5 -&gt; 1.50.0) [CRAN]
      zip         (2.1.1  -&gt; 2.2.0 ) [CRAN]
      Installing 7 packages: matrixStats, fansi, tibble, cachem, stringi, rtracklayer, zip
  Warning: package ‘matrixStats’ is in use and will not be installed
  Installing packages into ‘C:/Users/saeed/Documents/R/win-library/4.0’
  (as ‘lib’ is unspecified)
  
    There are binary versions available but the source versions are later:
              binary source needs_compilation
  stringi      1.5.3  1.6.2              TRUE
  rtracklayer 1.49.5 1.50.0              TRUE
  zip          2.1.1  2.2.0              TRUE
  
  trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/fansi_0.5.0.zip'
  Content type 'application/zip' length 248461 bytes (242 KB)
  downloaded 242 KB
  
  trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/tibble_3.1.2.zip'
  Content type 'application/zip' length 825073 bytes (805 KB)
  downloaded 805 KB
  
  trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/cachem_1.0.5.zip'
  Content type 'application/zip' length 78389 bytes (76 KB)
  downloaded 76 KB
  
  package ‘fansi’ successfully unpacked and MD5 sums checked
  Warning: cannot remove prior installation of package ‘fansi’
  Warning: restored ‘fansi’
  package ‘tibble’ successfully unpacked and MD5 sums checked
  Warning: cannot remove prior installation of package ‘tibble’
  Warning: restored ‘tibble’
  package ‘cachem’ successfully unpacked and MD5 sums checked
  Warning: cannot remove prior installation of package ‘cachem’
  Warning: restored ‘cachem’
  
  The downloaded binary packages are in
      C:\Users\saeed\AppData\Local\Temp\RtmpcBVi0v\downloaded_packages
  installing the source packages ‘stringi’, ‘rtracklayer’, ‘zip’
  
  trying URL 'https://cran.rstudio.com/src/contrib/stringi_1.6.2.tar.gz'
  Content type 'application/x-gzip' length 7575370 bytes (7.2 MB)
  downloaded 7.2 MB
  
  trying URL 'https://bioconductor.org/packages/3.12/bioc/src/contrib/rtracklayer_1.50.0.tar.gz'
  Content type 'application/x-gzip' length 6369416 bytes (6.1 MB)
  downloaded 6.1 MB
  
  trying URL 'https://cran.rstudio.com/src/contrib/zip_2.2.0.tar.gz'
  Content type 'application/x-gzip' length 114391 bytes (111 KB)
  downloaded 111 KB
  
  * installing *source* package 'stringi' ...
  ** package 'stringi' successfully unpacked and MD5 sums checked
  ERROR: cannot remove earlier installation, is it in use?
  * removing 'C:/Users/saeed/Documents/R/win-library/4.0/stringi'
  * restoring previous 'C:/Users/saeed/Documents/R/win-library/4.0/stringi'
  Warning in file.copy(lp, dirname(pkgdir), recursive = TRUE, copy.date = TRUE) :
    problem copying C:\Users\saeed\Documents\R\win-library\4.0\00LOCK-stringi\stringi\libs\icudt61l.dat to C:\Users\saeed\Documents\R\win-library\4.0\stringi\libs\icudt61l.dat: Invalid argument
  Warning in file.copy(lp, dirname(pkgdir), recursive = TRUE, copy.date = TRUE) :
    problem copying C:\Users\saeed\Documents\R\win-library\4.0\00LOCK-stringi\stringi\libs\x64\stringi.dll to C:\Users\saeed\Documents\R\win-library\4.0\stringi\libs\x64\stringi.dll: Permission denied
  * installing *source* package 'rtracklayer' ...
  ERROR: cannot remove earlier installation, is it in use?
  * removing 'C:/Users/saeed/Documents/R/win-library/4.0/rtracklayer'
  * restoring previous 'C:/Users/saeed/Documents/R/win-library/4.0/rtracklayer'
  Warning in file.copy(lp, dirname(pkgdir), recursive = TRUE, copy.date = TRUE) :
    problem copying C:\Users\saeed\Documents\R\win-library\4.0\00LOCK-rtracklayer\rtracklayer\libs\x64\rtracklayer.dll to C:\Users\saeed\Documents\R\win-library\4.0\rtracklayer\libs\x64\rtracklayer.dll: Permission denied
  * installing *source* package 'zip' ...
  ** package 'zip' successfully unpacked and MD5 sums checked
  ** using staged installation
  ** libs
  
  *** arch - i386
  &quot;c:/rtools40/mingw32/bin/&quot;gcc  -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -DCMDZIP miniz.c zip.c winutils.c tools/cmdzip.c \
  -municode -o tools/cmdzip.exe
  sh: c:/rtools40/mingw32/bin/gcc: No such file or directory
  make: *** [Makevars.win:9: tools/cmdzip.exe] Error 127
  ERROR: compilation failed for package 'zip'
  * removing 'C:/Users/saeed/Documents/R/win-library/4.0/zip'
  * restoring previous 'C:/Users/saeed/Documents/R/win-library/4.0/zip'
  
  The downloaded source packages are in
      ‘C:\Users\saeed\AppData\Local\Temp\RtmpcBVi0v\downloaded_packages’
  √  checking for file 'C:\Users\saeed\AppData\Local\Temp\RtmpcBVi0v\remotes4c682cb429e7\isglobal-brge-methylclock-6f8c69a/DESCRIPTION' ...
  -  preparing 'methylclock': (1.3s)
  √  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
  -  building 'methylclock_0.7.5.tar.gz'
     
  Installing package into ‘C:/Users/saeed/Documents/R/win-library/4.0’
  (as ‘lib’ is unspecified)
  * installing *source* package 'methylclock' ...
  ** using staged installation
  ** libs
  
  *** arch - i386
  &quot;c:/rtools40/mingw32/bin/&quot;g++ -std=gnu++11  -I&quot;C:/PROGRA~1/R/R-40~1.5/include&quot; -DNDEBUG  -I'C:/Users/saeed/Documents/R/win-library/4.0/Rcpp/include'        -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign -c NewModel1Clean.cpp -o NewModel1Clean.o
  sh: c:/rtools40/mingw32/bin/g++: No such file or directory
  make: *** [C:/PROGRA~1/R/R-40~1.5/etc/i386/Makeconf:229: NewModel1Clean.o] Error 127
  ERROR: compilation failed for package 'methylclock'
  * removing 'C:/Users/saeed/Documents/R/win-library/4.0/methylclock'
  Warning messages:
  1: In file.copy(savedcopy, lib, recursive = TRUE) :
    problem copying C:\Users\saeed\Documents\R\win-library\4.0\00LOCK\fansi\libs\x64\fansi.dll to C:\Users\saeed\Documents\R\win-library\4.0\fansi\libs\x64\fansi.dll: Permission denied
  2: In file.copy(savedcopy, lib, recursive = TRUE) :
    problem copying C:\Users\saeed\Documents\R\win-library\4.0\00LOCK\tibble\libs\x64\tibble.dll to C:\Users\saeed\Documents\R\win-library\4.0\tibble\libs\x64\tibble.dll: Permission denied
  3: In file.copy(savedcopy, lib, recursive = TRUE) :
    problem copying C:\Users\saeed\Documents\R\win-library\4.0\00LOCK\cachem\libs\x64\cachem.dll to C:\Users\saeed\Documents\R\win-library\4.0\cachem\libs\x64\cachem.dll: Permission denied
  4: In i.p(...) :
    installation of package ‘stringi’ had non-zero exit status
  5: In i.p(...) :
    installation of package ‘rtracklayer’ had non-zero exit status
  6: In i.p(...) : installation of package ‘zip’ had non-zero exit status
  7: In i.p(...) :
    installation of package ‘C:/Users/saeed/AppData/Local/Temp/RtmpcBVi0v/file4c68a8c1be0/methylclock_0.7.5.tar.gz’ had non-zero exit status
  </code></pre>