Skip to content

devtools failing to load under R 4.5.0 #2601

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
eipi10 opened this issue Apr 15, 2025 · 2 comments
Closed

devtools failing to load under R 4.5.0 #2601

eipi10 opened this issue Apr 15, 2025 · 2 comments

Comments

@eipi10
Copy link

eipi10 commented Apr 15, 2025

I just installed R 4.5.0 and reinstalled all of the R packages I normally use. devtools installed without error. However, when I loaded devtools I got the following error:

> library(devtools)
Loading required package: usethis
Error: package or namespace load failed for ‘devtools’ in inDL(x, as.logical(local), as.logical(now), ...):
 unable to load shared object 'C:/Users/joel/AppData/Local/R/win-library/4.5/httpuv/libs/x64/httpuv.dll':
  LoadLibrary failure:  The specified procedure could not be found.

I checked and the httpuv package is installed and the file httpuv.dll is present in the location listed above. I got the same error when I tried to load httpuv. I was not getting this error under R 4.4.3 and devtools was working as expected.

I tried reinstalling httpuv from source to see if that fixed the problem, but I got the following error:

> install.packages("httpuv", type="source")
** libs
g++ -std=gnu++17 -I"C:/PROGRA~1/R/R-45~1.0/include" -DNDEBUG -D_WIN32_WINNT=0x0600 -DSTRICT_R_HEADERS -I'C:/Users/joel/AppData/Local/R/win-library/4.5/later/include' -I'C:/Users/joel/AppData/Local/R/win-library/4.5/Rcpp/include' -I"c:/rtools45/x86_64-w64-mingw32.static.posix/include" -DSTRICT_R_HEADERS -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c RcppExports.cpp -o RcppExports.o
/bin/sh: line 1: g++: command not found
make: *** [C:/PROGRA~1/R/R-45~1.0/etc/x64/Makeconf:296: RcppExports.o] Error 127
ERROR: compilation failed for package 'httpuv'

System Info

  • Operating System: Windows Server 2016 Standard (I remote in using MS Remote Desktop)
  • R version: 4.5.0
  • RStudio version: 2024.12.1.563
  • devtools version: 2.4.5
  • httpuv version: 1.6.15
@jennybc
Copy link
Member

jennybc commented Apr 15, 2025

The error above indicates that you don't have the tooling to install packages from source (such as the g++ compiler). For that, you'd need to install Rtools:

https://r-pkgs.org/setup.html#setup-tools

But the original problem is that httpuv doesn't actually work. I'm not entirely sure what's going on there, but I note that Windows Server 2016 Standard is quite old. It's conceivable that that is the problem. I'm closing this issue as this is out of scope for devtools. You could consider opening another issue on httpuv itself, but I suspect your troubles are not specific to httpuv but rather to "packages with compiled code" or something along those lines (?).

@jennybc jennybc closed this as completed Apr 15, 2025
@eipi10
Copy link
Author

eipi10 commented Apr 15, 2025

Thanks Jenny. I saw Rtools 4.5 in my path, so I didn't think that would be an issue. I tried a direct install of Rtools 4.5 but that didn't fix the problem. I tried installing a few other packages from source, and that worked as expected. I realize Windows Server 2016 is old, but unfortunately I have limited influence over our computing infrastructure. For now I've rolled back to R 4.4.3, while I get my IT folks to look into what might be happening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants