Unable to load packages after updating R to 4.3.

Hello!

I recently updated R and R-studio to the newest version of R. However, now that I've done so, I am unable to load any packages. For example, after installing edgeR, I get the following error:

Loading required package: limma
Error: package or namespace load failed for ‘edgeR’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/edgeR/libs/edgeR.so':
  dlopen(/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/edgeR/libs/edgeR.so, 0x0006): Library not loaded: '/opt/gfortran/lib/gcc/x86_64-apple-darwin20.0/12.2.0/libgfortran.5.dylib'
  Referenced from: '/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/edgeR/libs/edgeR.so'
  Reason: tried: '/opt/gfortran/lib/gcc/x86_64-apple-darwin20.0/12.2.0/libgfortran.5.dylib' (no such file), '/usr/local/lib/libgfortran.5.dylib' (no such file), '/usr/lib/libgfortran.5.dylib' (no such file)

I have tried uninstalling and reinstalling R and R studio, as well as trying to run these commands in R instead of R studio, but I still get the same error.

Any help is much appreciated! Thank you!

I've had the same issue. I workaround it by creating the following R script.

install.packages("remotes")
library(remotes)
install_version("tzdb", "0.4.0")

Where 0.4.0 is the future version displayed in Install Package Updates

Using marcelobpalermo's example, if there is a compiled binary for tzdb 0.4.0 then it should be updated without any problems. If not, you will need to compile from source, which requires the Command Line Tools and gfortran compiler to be installed. You will need to force it to use the source file, either by specifying the version # in remotes::install_version() or including type = "source" in install.packages().

The alternative is waiting for a binary to be posted. There is now an R 4.3 binary for Intel mac users, but not for Apple silicon processors (m1 and m2).

Hopefully, R 4.3.0 will be patched to fix this.

1 Like

This topic was automatically closed 42 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.