error installing devtools after updating r

I have updated r to the latest version.
When I reinstalled the packages, I installed devtools (with dependencies), however, when I want to use this package, I get the following error:

trying URL ''
Content type 'application/x-gzip' length 337605 bytes (329 KB)
downloaded 329 KB

The downloaded binary packages are in

library("devtools", lib.loc="/Library/Frameworks/R.framework/Versions/4.0/Resources/library")
Loading required package: usethis
Error: package or namespace load failed for ‘devtools’:
.onLoad failed in loadNamespace() for 'pkgload', details:
call: loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]])
error: there is no package called ‘rprojroot’

Could you please help me understand what's wrong?
Thanks in advance :slight_smile:

I'll add that I've tried to install rprojroot and it's not working.

> install.packages("rprojroot")

  There is a binary version available but the source version is later:
          binary source needs_compilation
rprojroot  1.3-2  2.0.2             FALSE

installing the source package ‘rprojroot’

trying URL ''
Content type 'application/x-gzip' length 59967 bytes (58 KB)
downloaded 58 KB

Warning in file(con, "r") :
  cannot open file '/var/db/timezone/zoneinfo/+VERSION': No such file or directory
dyld: lazy symbol binding failed: Symbol not found: _utimensat
  Referenced from: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libR.dylib (which was built for Mac OS X 10.13)
  Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: _utimensat
  Referenced from: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libR.dylib (which was built for Mac OS X 10.13)
  Expected in: /usr/lib/libSystem.B.dylib

/Library/Frameworks/R.framework/Resources/bin/INSTALL: line 34:  5131 Done                    echo 'tools:::.install_packages()'
      5132 Abort trap: 6           | R_DEFAULT_PACKAGES= LC_COLLATE=C "${R_HOME}/bin/R" $myArgs --no-echo --args ${args}
Warning in install.packages :
  installation of package ‘rprojroot’ had non-zero exit status

The downloaded source packages are in


Welcome to the RStudio community!

These types of errors can be common when installing new version of R, but usually they can be solved my manually (re)installing the missing packages. I your case it seems ‘rprojroot’ is the culprit, so I suggest you install that one first, then install 'devtools again'. If there is again a missing package, repeat the process.

Hope this helps,

I would recommend trying to install rprojroot from binary rather than source as then you can dodge having to read about xcode and setting up to compile on macos

Thank you!
It worked :clap: :clap: :clap:

1 Like

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.