When checking my R package with devtools::check()
, I run into this error.
══ Checking ═══════════════════════════════════════════════════════════
Setting env vars:
• _R_CHECK_CRAN_INCOMING_REMOTE_ : FALSE
• _R_CHECK_CRAN_INCOMING_ : FALSE
• _R_CHECK_FORCE_SUGGESTS_ : FALSE
• _R_CHECK_PACKAGES_USED_IGNORE_UNUSED_IMPORTS_: FALSE
• NOT_CRAN : true
Error: Could not find tools necessary to compile a package
Call `pkgbuild::check_build_tools(debug = TRUE)` to diagnose the problem.
Execution halted
Exited with status 1.
However, when I run the hint, no issues are being detected.
> pkgbuild::check_build_tools(debug = TRUE)
Your system is ready to build packages!
I don't even know how to continue debugging the problem from here. Any ideas would be very welcome. I am running RStudio 2024.04.1 and R-4.4.0
Solved this by installing the latest version of RTools (44)
https://cran.r-project.org/bin/windows/Rtools/rtools44/rtools.html