'Non zero exit status when installing package

I have been trying to install the baseballr package using the following commands:

if (!requireNamespace('devtools', quietly = TRUE)){ install.packages('devtools') }
devtools::install_github(repo = "BillPetti/baseballr")

# install.packages("devtools") 
devtools::install_github("BillPetti/baseballr", ref = "development_branch")

After the code runs, I receive an error message saying that the installation had "non-zero exit status".

Attached is the entire output of the command.

Installing package into ‘C:/Users/pmosb/Documents/R/win-library/4.1’
(as ‘lib’ is unspecified)
* installing *source* package 'baseballr' ...
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  namespace 'rlang' 0.4.11 is being loaded, but >= 1.0.0 is required
Calls: <Anonymous> ... namespaceImport -> loadNamespace -> namespaceImport -> loadNamespace
Execution halted
ERROR: lazy loading failed for package 'baseballr'
* removing 'C:/Users/pmosb/Documents/R/win-library/4.1/baseballr'
Warning in i.p(...) :
  installation of package ‘C:/Users/pmosb/AppData/Local/Temp/RtmpkNJd0u/file4e3056653a7d/baseballr_1.0.2.tar.gz’ had non-zero exit status

How could I correct this issue?

r


Solution 1:[1]

The error message is telling you that baseballr required rlang of version 1.0.0 or greater, but you only have version 0.4.11. Try running install.packages("rlang") then trying again with baseballr.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Matt Cowgill