Hello,
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:
The downloaded binary packages are in
/var/folders/k6/6hcwnkcn099frbhql59cjg900000gn/T//RtmpuPFy8Z/downloaded_packages
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
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 'https://cran.rstudio.com/src/contrib/rprojroot_2.0.2.tar.gz'
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
‘/private/var/folders/k6/6hcwnkcn099frbhql59cjg900000gn/T/RtmpuPFy8Z/downloaded_packages’
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.
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