Problem with "devtools" installation

Dear all,

I have a problem installing devtools. After following the normal procedure as attached, R studio is displaying
Error in library(devtools) : there is no package called ‘devtools’

these are the procedures I followed,
Step 1, I installed the package by using
install.packages('devtools')

and I got this result.

WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/Oluwa.DESKTOP-9RN3VN4/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependencies ‘openssl’, ‘zip’, ‘fastmap’, ‘highr’, ‘xfun’, ‘gert’, ‘processx’, ‘cachem’, ‘knitr’, ‘purrr’, ‘brio’, ‘ps’, ‘waldo’, ‘usethis’, ‘callr’, ‘ellipsis’, ‘fs’, ‘jsonlite’, ‘lifecycle’, ‘memoise’, ‘pkgbuild’, ‘pkgload’, ‘rcmdcheck’, ‘rlang’, ‘roxygen2’, ‘testthat’


  There are binary versions available but the source versions
  are later:
          binary source needs_compilation
openssl      1.3  1.4.3              TRUE
zip        2.0.1  2.1.1              TRUE
highr        0.8    0.9             FALSE
xfun         0.6   0.22             FALSE
processx   3.3.0  3.5.1              TRUE
knitr       1.22   1.33             FALSE
purrr      0.3.2  0.3.4              TRUE
ps         1.3.0  1.6.0              TRUE
usethis    1.5.0  2.0.1             FALSE
callr      3.2.0  3.7.0             FALSE
ellipsis   0.1.0  0.3.1              TRUE
fs         1.2.7  1.5.0              TRUE
jsonlite     1.6  1.7.2              TRUE
memoise    1.1.0  2.0.0             FALSE
pkgbuild   1.0.3  1.2.0             FALSE
pkgload    1.0.2  1.2.1              TRUE
rcmdcheck  1.3.1  1.3.3             FALSE
rlang      0.3.4 0.4.10              TRUE
roxygen2   6.1.1  7.1.1              TRUE
testthat   2.1.1  3.0.2              TRUE
devtools   2.0.2  2.4.0             FALSE

  Binaries will be installed
Packages which are only available in source form, and may need
  compilation of C/C++/Fortran: ‘fastmap’ ‘gert’ ‘cachem’ ‘brio’
  These will not be installed
*********
* installing *source* package 'xfun' ...
** package 'xfun' successfully unpacked and MD5 sums checked
** libs

*** arch - i386
Warning: running command 'make -f "Makevars" -f "C:/PROGRA~1/R/R-34~1.3/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-34~1.3/share/make/winshlib.mk" SHLIB="xfun.dll" OBJECTS="base64.o init.o"' had status 127
ERROR: compilation failed for package 'xfun'
* removing 'C:/Users/Oluwa.DESKTOP-9RN3VN4/Documents/R/win-library/3.4/xfun'
In R CMD INSTALL
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-34~1.3/bin/x64/R" CMD INSTALL -l "C:\Users\Oluwa.DESKTOP-9RN3VN4\Documents\R\win-library\3.4" C:\Users\OLUWA~1.DES\AppData\Local\Temp\RtmpC8qIrU/downloaded_packages/xfun_0.22.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘xfun’ had non-zero exit status
* installing *source* package 'waldo' ...
** package 'waldo' successfully unpacked and MD5 sums checked
** R
** preparing package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  namespace 'rlang' 0.3.4 is being loaded, but >= 0.4.10 is required
ERROR: lazy loading failed for package 'waldo'
* removing 'C:/Users/Oluwa.DESKTOP-9RN3VN4/Documents/R/win-library/3.4/waldo'
In R CMD INSTALL
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-34~1.3/bin/x64/R" CMD INSTALL -l "C:\Users\Oluwa.DESKTOP-9RN3VN4\Documents\R\win-library\3.4" C:\Users\OLUWA~1.DES\AppData\Local\Temp\RtmpC8qIrU/downloaded_packages/waldo_0.2.5.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘waldo’ had non-zero exit status
* installing *source* package 'callr' ...
** package 'callr' successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
  namespace 'processx' 3.3.0 is being loaded, but >= 3.5.0 is required
ERROR: lazy loading failed for package 'callr'
* removing 'C:/Users/Oluwa.DESKTOP-9RN3VN4/Documents/R/win-library/3.4/callr'
In R CMD INSTALL
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-34~1.3/bin/x64/R" CMD INSTALL -l "C:\Users\Oluwa.DESKTOP-9RN3VN4\Documents\R\win-library\3.4" C:\Users\OLUWA~1.DES\AppData\Local\Temp\RtmpC8qIrU/downloaded_packages/callr_3.7.0.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘callr’ had non-zero exit status
* installing *source* package 'lifecycle' ...
** package 'lifecycle' successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  namespace 'rlang' 0.3.4 is being loaded, but >= 0.4.10 is required
ERROR: lazy loading failed for package 'lifecycle'
* removing 'C:/Users/Oluwa.DESKTOP-9RN3VN4/Documents/R/win-library/3.4/lifecycle'
In R CMD INSTALL
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-34~1.3/bin/x64/R" CMD INSTALL -l "C:\Users\Oluwa.DESKTOP-9RN3VN4\Documents\R\win-library\3.4" C:\Users\OLUWA~1.DES\AppData\Local\Temp\RtmpC8qIrU/downloaded_packages/lifecycle_1.0.0.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘lifecycle’ had non-zero exit status
ERROR: dependency 'cachem' is not available for package 'memoise'
* removing 'C:/Users/Oluwa.DESKTOP-9RN3VN4/Documents/R/win-library/3.4/memoise'
In R CMD INSTALL
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-34~1.3/bin/x64/R" CMD INSTALL -l "C:\Users\Oluwa.DESKTOP-9RN3VN4\Documents\R\win-library\3.4" C:\Users\OLUWA~1.DES\AppData\Local\Temp\RtmpC8qIrU/downloaded_packages/memoise_2.0.0.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘memoise’ had non-zero exit status
ERROR: dependency 'xfun' is not available for package 'highr'
* removing 'C:/Users/Oluwa.DESKTOP-9RN3VN4/Documents/R/win-library/3.4/highr'
In R CMD INSTALL
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-34~1.3/bin/x64/R" CMD INSTALL -l "C:\Users\Oluwa.DESKTOP-9RN3VN4\Documents\R\win-library\3.4" C:\Users\OLUWA~1.DES\AppData\Local\Temp\RtmpC8qIrU/downloaded_packages/highr_0.9.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘highr’ had non-zero exit status
ERROR: dependencies 'gert', 'lifecycle' are not available for package 'usethis'
* removing 'C:/Users/Oluwa.DESKTOP-9RN3VN4/Documents/R/win-library/3.4/usethis'
In R CMD INSTALL
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-34~1.3/bin/x64/R" CMD INSTALL -l "C:\Users\Oluwa.DESKTOP-9RN3VN4\Documents\R\win-library\3.4" C:\Users\OLUWA~1.DES\AppData\Local\Temp\RtmpC8qIrU/downloaded_packages/usethis_2.0.1.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘usethis’ had non-zero exit status
ERROR: dependency 'callr' is not available for package 'pkgbuild'
* removing 'C:/Users/Oluwa.DESKTOP-9RN3VN4/Documents/R/win-library/3.4/pkgbuild'
In R CMD INSTALL
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-34~1.3/bin/x64/R" CMD INSTALL -l "C:\Users\Oluwa.DESKTOP-9RN3VN4\Documents\R\win-library\3.4" C:\Users\OLUWA~1.DES\AppData\Local\Temp\RtmpC8qIrU/downloaded_packages/pkgbuild_1.2.0.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘pkgbuild’ had non-zero exit status
ERROR: dependencies 'highr', 'xfun' are not available for package 'knitr'
* removing 'C:/Users/Oluwa.DESKTOP-9RN3VN4/Documents/R/win-library/3.4/knitr'
In R CMD INSTALL
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-34~1.3/bin/x64/R" CMD INSTALL -l "C:\Users\Oluwa.DESKTOP-9RN3VN4\Documents\R\win-library\3.4" C:\Users\OLUWA~1.DES\AppData\Local\Temp\RtmpC8qIrU/downloaded_packages/knitr_1.33.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘knitr’ had non-zero exit status
ERROR: dependencies 'callr', 'pkgbuild' are not available for package 'rcmdcheck'
* removing 'C:/Users/Oluwa.DESKTOP-9RN3VN4/Documents/R/win-library/3.4/rcmdcheck'
In R CMD INSTALL
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-34~1.3/bin/x64/R" CMD INSTALL -l "C:\Users\Oluwa.DESKTOP-9RN3VN4\Documents\R\win-library\3.4" C:\Users\OLUWA~1.DES\AppData\Local\Temp\RtmpC8qIrU/downloaded_packages/rcmdcheck_1.3.3.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘rcmdcheck’ had non-zero exit status
ERROR: dependencies 'usethis', 'callr', 'lifecycle', 'memoise', 'pkgbuild', 'rcmdcheck' are not available for package 'devtools'
* removing 'C:/Users/Oluwa.DESKTOP-9RN3VN4/Documents/R/win-library/3.4/devtools'
In R CMD INSTALL
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-34~1.3/bin/x64/R" CMD INSTALL -l "C:\Users\Oluwa.DESKTOP-9RN3VN4\Documents\R\win-library\3.4" C:\Users\OLUWA~1.DES\AppData\Local\Temp\RtmpC8qIrU/downloaded_packages/devtools_2.4.0.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘devtools’ had non-zero exit status

The downloaded source packages are in
	‘C:\Users\Oluwa.DESKTOP-9RN3VN4\AppData\Local\Temp\RtmpC8qIrU\downloaded_packages’
> library(devtools)
Error in library(devtools) : there is no package called ‘devtools’
> 

Step 2: I utilize the library function to source for the installed package but the package is not found.

Kindly help me.
Thanks

The installation process is failing because your are using a very old R version so you are forced to compile packages from source instead of installing precompiled binaries (which are only available for the latest R versions), in order to be able to compile packages you need a compiler installed in your system, for Windows systems this is RTools. You can download the proper version of RTools from here

https://cran.r-project.org/bin/windows/Rtools/history.html

But, I would strongly recommend updating your R version