renv::install('gifski') not working - package installation working on non-renv projects

I am failing at adding the 'gifski' library to an existing renv project. I have installed and used 'gifski' outside of renv projects on the same machine.

Error below.

# Downloading packages -------------------------------------------------------
- Downloading gifski from CRAN ...              OK [file is up to date]
Successfully downloaded 1 package in 4.2 seconds.

The following package(s) will be installed:
- gifski [1.32.0-1]
These packages will be installed into "C:/Dev/EA078_Fall2024/renv/library/windows/R-4.4/x86_64-w64-mingw32".

# Installing packages --------------------------------------------------------
- Installing gifski ...                         FAILED
Traceback (most recent calls last):
15: .rs.sourceWithProgress(script = "C:/Users/MICHAE~1/AppData/Local/Temp/1305-855c-498f-e692", 
        encoding = "UTF-8", con = stdout(), importRdata = NULL, exportRdata = NULL)
14: eval(statements[[idx]], envir = globalenv())
13: eval(statements[[idx]], envir = globalenv())
12: renv::install("gifski")
11: renv_install_impl(records)
10: renv_install_staged(records)
 9: renv_install_default(records)
 8: handler(package, renv_install_package(record))
 7: renv_install_package(record)
 6: withCallingHandlers(renv_install_package_impl(record), error = function(e) writef("FAILED"))
 5: renv_install_package_impl(record)
 4: r_cmd_install(package, path)
 3: r_exec_error(package, output, "install", status)
 2: abort(all)
 1: stop(fallback)
Error: Error installing package 'gifski':
==================================

* installing *source* package 'gifski' ...
** package 'gifski' successfully unpacked and MD5 sums checked
** using staged installation
'sh' is not recognized as an internal or external command,
operable program or batch file.
Warning in system2(file.path(R.home("bin"), "Rcmd.exe"), c("config", x),  :
  running command '"C:/PROGRA~1/R/R-44~1.1/bin/x64/Rcmd.exe" config CC' had status 1
'sh' is not recognized as an internal or external command,
operable program or batch file....
...
**7 more warnings like that**
...
Error in (function (...)  : 'names' and 'val' are of different lengths
* removing 'C:/Dev/EA078_Fall2024/renv/staging/1/gifski'
install of package 'gifski' failed [error code 1]
Execution halted

renv::diagnostics() available upon request if needed to diagnose what is going on.

The output of renv::diagnostics() may be helpful, but the underlying issue appears to be that R is trying to install gifski from sources rather than installing a binary. You could try installing Rtools: RTools: Toolchains for building R and R packages from source on Windows

Installing RTools4.4 fixed it instantly.

Thank you so much!

This topic was automatically closed 7 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.