Issues installing packages in R: "dyld: lazy symbol binding failed" - r

I'm trying to install tidyverse and tidycensus, among other packages, and I'm getting a similar error for all of them. I'm working on a Mac. I've tried installing the dependencies separately, but I get similar error. I've tried installing RTools, but that didn't change anything. I wish I could give more information, but I've never encountered an error like this.
Here's the code:
install.packages("tidyverse")
And here's the output:
also installing the dependency ‘broom’
There is a binary version available but the source version is later:
binary source needs_compilation
broom 0.5.6 0.7.0 FALSE
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/tidyverse_1.3.0.tgz'
Content type 'application/x-gzip' length 432989 bytes (422 KB)
==================================================
downloaded 422 KB
The downloaded binary packages are in
/var/folders/6k/0tw5jym93c762cchf9bym93w0000gn/T//RtmpNdVhZw/downloaded_packages
installing the source package ‘broom’
trying URL 'https://cran.rstudio.com/src/contrib/broom_0.7.0.tar.gz'
Content type 'application/x-gzip' length 604195 bytes (590 KB)
==================================================
downloaded 590 KB
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: 20265 Done echo 'tools:::.install_packages()'
20266 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 ‘broom’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/6k/0tw5jym93c762cchf9bym93w0000gn/T/RtmpNdVhZw/downloaded_packages’

Related

Package ‘adegenet’ version 2.1.4 cannot be unloaded in R

I am trying to use a function in the R package adegenet
It seems like it will install fine, but then when i call the package i get an error.
> install.packages("adegenet")
Installing package into ‘/Users/j2/Library/R/4.1/library’
(as ‘lib’ is unspecified)
trying URL 'https://mirrors.nics.utk.edu/cran/bin/macosx/contrib/4.1/adegenet_2.1.5.tgz'
Content type 'application/x-gzip' length 2830546 bytes (2.7 MB)
==================================================
downloaded 2.7 MB
The downloaded binary packages are in
/var/folders/p9/cy6q_pk935z1dfplsjrts30h0000gr/T//RtmpZXEMHg/downloaded_packages
> library(adegenet)
Error in value[[3L]](cond) :
Package ‘adegenet’ version 2.1.4 cannot be unloaded:
Error in unloadNamespace(package) : namespace ‘adegenet’ is imported by ‘adephylo’ so cannot be unloaded
I'm not sure if the problem is with the install or calling the library. Any advice would be appreceated.
Thanks!

R doesn't work properly with conda installation

I tried installing r with conda and every time I try that it doesn't work.
conda create --name test2 -c conda-forge r-base r-seurat
I assumed that by using conda-forge channel, it will install the most updated version. What happened is that it installs the oldest version of R which is 3.6.1
At the same time, the "Seurat" package requires a newer version of R than 3.6.1
So, I specified a version of R in that code and it didn't work too
conda create --name test2 -c conda-forge r-base=4.1.1
This worked for installing a newer R version but when I try activating R on that environment, it gives me an error
Error in library(beepr) : there is no package called ‘beepr’
So, I opened rstudio from that environment and tried installing (beepr) package and it didn't work! It tries to install other packages as a requirement for it and at the same time gives the same error of not having "beepr" installed.
That's one of the packages it tried to install.
Warning in install.packages : installation of package ‘glue’ had non-zero exit status Error in library(beepr) : there is no package called ‘beepr’ Execution halted
and it does that with the rest of packages required.
That's the error I get from installing beepr
also installing the dependencies ‘glue’, ‘magrittr’, ‘stringi’, ‘stringr’, ‘audio’ trying URL 'https://cran.rstudio.com/src/contrib/glue_1.4.2.tar.gz' Content type 'application/x-gzip' length 99049 bytes (96 KB) ================================================== downloaded 96 KB trying URL 'https://cran.rstudio.com/src/contrib/magrittr_2.0.1.tar.gz' Content type 'application/x-gzip' length 265580 bytes (259 KB) ================================================== downloaded 259 KB trying URL 'https://cran.rstudio.com/src/contrib/stringi_1.7.4.tar.gz' Content type 'application/x-gzip' length 7599762 bytes (7.2 MB) ================================================== downloaded 7.2 MB trying URL 'https://cran.rstudio.com/src/contrib/stringr_1.4.0.tar.gz' Content type 'application/x-gzip' length 135777 bytes (132 KB) ================================================== downloaded 132 KB trying URL 'https://cran.rstudio.com/src/contrib/audio_0.1-8.tar.gz' Content type 'application/x-gzip' length 57390 bytes (56 KB) ================================================== downloaded 56 KB trying URL 'https://cran.rstudio.com/src/contrib/beepr_1.3.tar.gz' Content type 'application/x-gzip' length 922244 bytes (900 KB) ================================================== downloaded 900 KB Error in library(beepr) : there is no package called ‘beepr’ Execution halted Warning in install.packages : installation of package ‘glue’ had non-zero exit status Error in library(beepr) : there is no package called ‘beepr’ Execution halted Warning in install.packages : installation of package ‘magrittr’ had non-zero exit status Error in library(beepr) : there is no package called ‘beepr’ Execution halted Warning in install.packages : installation of package ‘stringi’ had non-zero exit status Error in library(beepr) : there is no package called ‘beepr’ Execution halted Warning in install.packages : installation of package ‘audio’ had non-zero exit status Error in library(beepr) : there is no package called ‘beepr’ Execution halted Warning in install.packages : installation of package ‘stringr’ had non-zero exit status Error in library(beepr) : there is no package called ‘beepr’ Execution halted Warning in install.packages : installation of package ‘beepr’ had non-zero exit status The downloaded source packages are in ‘/tmp/Rtmp0CeBTl/downloaded_packages’ Updating HTML index of packages in '.Library' Making 'packages.html' ... done Warning in install.packages : converting NULL pointer to R NULL Warning message: R graphics engine version 14 is not supported by this version of RStudio. The Plots tab will be disabled until a newer version of RStudio is installed.
Did anyone face that issue before?

R 4, tidyverse install issue, no httr package

I did a fresh install of R and RStudio today, and now tidy verse will not load, including when I specify (or don't specify) the lib for the install and the load. Have restarted multiple times, each time the issue is that "there is no package called 'httr'". Code example:
install.packages("tidyverse", dependencies = TRUE, lib = "/Users/Darcy/Library/R/4.0/library")
library(tidyverse, lib = "/Users/Darcy/Library/R/4.0/library")
and resulting failure (complete):
> install.packages("tidyverse", dependencies = TRUE, lib = "/Users/Darcy/Library/R/4.0/library")
also installing the dependency ‘httr’
There is a binary version available but the source version is later:
binary source needs_compilation
httr 1.4.1 1.4.2 FALSE
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/tidyverse_1.3.0.tgz'
Content type 'application/x-gzip' length 433049 bytes (422 KB)
==================================================
downloaded 422 KB
The downloaded binary packages are in
/var/folders/rl/vd2lvhf96fd9d69qvmc9pys00000gq/T//Rtmpj5S5Yc/downloaded_packages
installing the source package ‘httr’
trying URL 'https://cran.rstudio.com/src/contrib/httr_1.4.2.tar.gz'
Content type 'application/x-gzip' length 159950 bytes (156 KB)
==================================================
downloaded 156 KB
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: 1057 Done echo 'tools:::.install_packages()'
1058 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 ‘httr’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/rl/vd2lvhf96fd9d69qvmc9pys00000gq/T/Rtmpj5S5Yc/downloaded_packages’
> library(tidyverse, lib = "/Users/Darcy/Library/R/4.0/library")
Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘httr’
My iMac computer cannot update any more, but switching to R3.6.3 (El Capitan) was an effective solution.
I mistakenly updated my R from 3.4.2 to 4.0.2, which was too far.

Unable to install the car package in R Studio in Windows 10

I'm running RStudio v1.2.5019.
The User folder on my laptop where the packages are stored is C:\Users\R Shiva
I am trying to install packages including car but I'm getting the following error.
Installing package into ‘C:/Users/R Shiva/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
also installing the dependency ‘carData’
There are binary versions available but the source versions are later:
binary source needs_compilation
carData 3.0-2 3.0-3 FALSE
car 3.0-4 3.0-5 FALSE
installing the source packages ‘carData’, ‘car’
trying URL 'https://cran.rstudio.com/src/contrib/carData_3.0-3.tar.gz'
Content type 'application/x-gzip' length 995544 bytes (972 KB)
downloaded 972 KB
trying URL 'https://cran.rstudio.com/src/contrib/car_3.0-5.tar.gz'
Content type 'application/x-gzip' length 504300 bytes (492 KB)
downloaded 492 KB
Warning: invalid package 'C:\Users\R'
Warning: invalid package 'Shiva\AppData\Local\Temp\RtmpU7R8OM/downloaded_packages/carData_3.0-3.tar.gz'
Error: ERROR: no packages specified
Warning in install.packages :
installation of package ‘carData’ had non-zero exit status
Warning: invalid package 'C:\Users\R'
Warning: invalid package 'Shiva\AppData\Local\Temp\RtmpU7R8OM/downloaded_packages/car_3.0-5.tar.gz'
Error: ERROR: no packages specified
Warning in install.packages :
installation of package ‘car’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\R Shiva\AppData\Local\Temp\RtmpU7R8OM\downloaded_packages’

R does not find "update.packages"

I am running R in version 3.4.1 under Windows 7 64-bit. When I give update.packages(ask=FALSE) the routine starts, identifies some packages to be updated, downloads packages, and then returns:
Error in update.packages(ask = FALSE) :
could not find function "update.packages"
Execution halted
I cannot find a reason for this problem. I just installed the newest version of R.
Complete output: I add the complete output. Maybe the problem is hidden in here, see e.g. the Warning messages. I shortened some paths (...). The problem seems to be with package knitr?
There are binary versions available but the source versions are later:
binary source needs_compilation
knitr 1.16 1.17 FALSE
rlang 0.1.1 0.1.2 TRUE
Binaries will be installed
trying URL 'https://cran.wu.ac.at/bin/windows/contrib/3.4/rlang_0.1.1.zip'
Content type 'application/zip' length 466606 bytes (455 KB)
downloaded 455 KB
package ‘rlang’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\...
installing the source package ‘knitr’
trying URL 'https://cran.wu.ac.at/src/contrib/knitr_1.17.tar.gz'
Content type 'application/x-gzip' length 769923 bytes (751 KB)
downloaded 751 KB
Error in update.packages(ask = FALSE) :
could not find function "update.packages"
Execution halted
The downloaded source packages are in
‘C:\Users\...’
Warning messages:
1: running command '"C:/PROGRA~1/R/R-34~1.1/bin/x64/R" CMD INSTALL -l "N:\RLibrary" C:\Users\...' had status 1
2: In install.packages(update[instlib == l, "Package"], l, repos = repos, :
installation of package ‘knitr’ had non-zero exit status

Resources