Errors trying to install rmarkdown dependencies

When I press knit I get the following error:

"Rendering R Markdown documents requires updated versions of the following packages: glue, highr, knitr, magrittr, markdown, stringr, tinytex, xfun, yaml." When I press "yes" to install these packages it does not install and an error message appears. Examples of messages:

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.2.0 is being loaded, but >= 0.4.10 is required
ERROR: lazy loading failed for package 'lifecycle'

  • removing 'C:/Users/christb/Documents/R/R-3.3.2/library/lifecycle'
    Warning in install.packages :
    running command '"C:/Users/christb/DOCUME~1/R/R-33~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\christb\Documents\R\R-3.3.2\library" C:\Users\christb\AppData\Local\Temp\RtmpU3aBmB/downloaded_packages/lifecycle_1.0.0.tar.gz' had status 1
    Warning in install.packages :
    installation of package ‘lifecycle’ had non-zero exit status
  • installing source package 'magrittr' ...
    ** package 'magrittr' successfully unpacked and MD5 sums checked
    ** libs

*** arch - i386
Warning: running command 'make -f "C:/Users/christb/DOCUME~1/R/R-33~1.2/etc/i386/Makeconf" -f "C:/Users/christb/DOCUME~1/R/R-33~1.2/share/make/winshlib.mk" SHLIB="magrittr.dll" OBJECTS="pipe.o utils.o"' had status 127
ERROR: compilation failed for package 'magrittr'

  • removing 'C:/Users/christb/Documents/R/R-3.3.2/library/magrittr'
    Warning in install.packages :
    running command '"C:/Users/christb/DOCUME~1/R/R-33~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\christb\Documents\R\R-3.3.2\library" C:\Users\christb\AppData\Local\Temp\RtmpU3aBmB/downloaded_packages/magrittr_2.0.1.tar.gz' had status 1
    Warning in install.packages :
    installation of package ‘magrittr’ had non-zero exit status
  • installing source package 'xfun' ...
    ** package 'xfun' successfully unpacked and MD5 sums checked
    ** libs

*** arch - i386
Warning: running command 'make -f "Makevars" -f "C:/Users/christb/DOCUME~1/R/R-33~1.2/etc/i386/Makeconf" -f "C:/Users/christb/DOCUME~1/R/R-33~1.2/share/make/winshlib.mk" SHLIB="xfun.dll" OBJECTS="base64.o init.o"' had status 127
ERROR: compilation failed for package 'xfun'

  • removing 'C:/Users/christb/Documents/R/R-3.3.2/library/xfun'
    Warning in install.packages :
    running command '"C:/Users/christb/DOCUME~1/R/R-33~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\christb\Documents\R\R-3.3.2\library" C:\Users\christb\AppData\Local\Temp\RtmpU3aBmB/downloaded_packages/xfun_0.24.tar.gz' had status 1
    Warning in install.packages :
    installation of package ‘xfun’ had non-zero exit status
  • installing source package 'cli' ...
    ** package 'cli' successfully unpacked and MD5 sums checked
    ** libs

*** arch - i386
Warning: running command 'make -f "C:/Users/christb/DOCUME~1/R/R-33~1.2/etc/i386/Makeconf" -f "C:/Users/christb/DOCUME~1/R/R-33~1.2/share/make/winshlib.mk" SHLIB="cli.dll" OBJECTS="cleancall.o errors.o init.o progress-altrep.o progress.o thread.o tty.o win-utf8.o"' had status 127
ERROR: compilation failed for package 'cli'

  • removing 'C:/Users/christb/Documents/R/R-3.3.2/library/cli'
    Warning in install.packages :
    running command '"C:/Users/christb/DOCUME~1/R/R-33~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\christb\Documents\R\R-3.3.2\library" C:\Users\christb\AppData\Local\Temp\RtmpU3aBmB/downloaded_packages/cli_3.0.0.tar.gz' had status 1
    Warning in install.packages :
    installation of package ‘cli’ had non-zero exit status
  • installing source package 'boot' ...
    ** package 'boot' successfully unpacked and MD5 sums checked
    ** R
    ** data
    *** moving datasets to lazyload DB
    ** inst
    ** byte-compile and prepare package for lazy loading
    ** help
    *** installing help indices
    ** building package indices
    ** testing if installed package can be loaded
    *** arch - i386
    *** arch - x64
  • DONE (boot)
  • installing source package 'codetools' ...
    ** package 'codetools' successfully unpacked and MD5 sums checked
    ** R
    ** preparing package for lazy loading
    ** help
    *** installing help indices
    ** building package indices
    ** testing if installed package can be loaded
    *** arch - i386
    *** arch - x64
  • DONE (codetools)
    ERROR: dependencies 'cli', 'ellipsis', 'lifecycle', 'vctrs' are not available for package 'pillar'
  • removing 'C:/Users/christb/Documents/R/R-3.3.2/library/pillar'
    Warning in install.packages :
    running command '"C:/Users/christb/DOCUME~1/R/R-33~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\christb\Documents\R\R-3.3.2\library" C:\Users\christb\AppData\Local\Temp\RtmpU3aBmB/downloaded_packages/pillar_1.6.1.tar.gz' had status 1
    Warning in install.packages :
    installation of package ‘pillar’ had non-zero exit status
    ERROR: dependencies 'ellipsis', 'magrittr' are not available for package 'forcats'
  • removing 'C:/Users/christb/Documents/R/R-3.3.2/library/forcats'
    Warning in install.packages :
    running command '"C:/Users/christb/DOCUME~1/R/R-33~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\christb\Documents\R\R-3.3.2\library" C:\Users\christb\AppData\Local\Temp\RtmpU3aBmB/downloaded_packages/forcats_0.5.1.tar.gz' had status 1
    Warning in install.packages :
    installation of package ‘forcats’ had non-zero exit status
    ERROR: dependencies 'ellipsis', 'lifecycle', 'vctrs' are not available for package 'hms'
  • removing 'C:/Users/christb/Documents/R/R-3.3.2/library/hms'
    Warning in install.packages :
    running command '"C:/Users/christb/DOCUME~1/R/R-33~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\christb\Documents\R\R-3.3.2\library" C:\Users\christb\AppData\Local\Temp\RtmpU3aBmB/downloaded_packages/hms_1.1.0.tar.gz' had status 1
    Warning in install.packages :
    installation of package ‘hms’ had non-zero exit status
    ERROR: dependency 'magrittr' is not available for package 'stringr'
  • removing 'C:/Users/christb/Documents/R/R-3.3.2/library/stringr'
    Warning in install.packages :
    running command '"C:/Users/christb/DOCUME~1/R/R-33~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\christb\Documents\R\R-3.3.2\library" C:\Users\christb\AppData\Local\Temp\RtmpU3aBmB/downloaded_packages/stringr_1.4.0.tar.gz' had status 1
    Warning in install.packages :
    installation of package ‘stringr’ had non-zero exit status
    ERROR: dependency 'hms' is not available for package 'progress'
  • removing 'C:/Users/christb/Documents/R/R-3.3.2/library/progress'
    Warning in install.packages :
    running command '"C:/Users/christb/DOCUME~1/R/R-33~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\christb\Documents\R\R-3.3.2\library" C:\Users\christb\AppData\Local\Temp\RtmpU3aBmB/downloaded_packages/progress_1.2.2.tar.gz' had status 1
    Warning in install.packages :
    installation of package ‘progress’ had non-zero exit status

Any ideas what’s happening? I’ve tried install.packages with individual programs and also through tools but nothing works. Also tried installing the whole ggplot2 and same errors appear. When I try to knit, the same error above appears and I’m back to square one (telling me that I need to update those programs). I’m going around in circles!

Any help or advice will be gratefully received!

You have several installation issues so let's address them one at a time.

The first error message is asking you to update rlang, give it a try and let's see what happens, if you get an error message, post it here.

install.packages("rlang")

Also, you are using a very old version of R and that is going to make package installation harder than it could be. I strongly recommend you to update R to the latest stable version (4.1.0) and to only install the x64 version if you don't actually need any x32 only functionality.

7 posts were split to a new topic: Problem knitting rmarkdown file

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.