I think I have the same issue. Wondering if it's something to do with the png package itself?
When I try to load the package I need which imports png (Hmisc), I get this message.
> library(Hmisc)
Loading required package: Formula
Loading required package: ggplot2
Error: package or namespace load failed for ‘Hmisc’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Users/harlyjanedurbin/Library/R/4.0/library/png/libs/png.so':
dlopen(/Users/harlyjanedurbin/Library/R/4.0/library/png/libs/png.so, 6): Symbol not found: _inflateValidate
Referenced from: /Users/harlyjanedurbin/Library/R/4.0/library/png/libs/png.so (which was built for Mac OS X 10.13)
Expected in: /usr/lib/libz.1.dylib
in /Users/harlyjanedurbin/Library/R/4.0/library/png/libs/png.so
I've tried un-installing and re-installing both png and Hmisc and can do so without error.
> remove.packages("png")
Removing package from ‘/Users/harlyjanedurbin/Library/R/4.0/library’
(as ‘lib’ is unspecified)
> install.packages("png")
Installing package into ‘/Users/harlyjanedurbin/Library/R/4.0/library’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/png_0.1-7.tgz'
Content type 'application/x-gzip' length 369557 bytes (360 KB)
==================================================
downloaded 360 KB
The downloaded binary packages are in
/var/folders/7h/_xszd0lx7wzctr3r7zhc3hs40000gn/T//Rtmpx9yVN8/downloaded_packages
> remove.packages("Hmisc")
Removing package from ‘/Users/harlyjanedurbin/Library/R/4.0/library’
(as ‘lib’ is unspecified)
> install.packages("Hmisc")
Installing package into ‘/Users/harlyjanedurbin/Library/R/4.0/library’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/Hmisc_4.4-1.tgz'
Content type 'application/x-gzip' length 3144200 bytes (3.0 MB)
==================================================
downloaded 3.0 MB
The downloaded binary packages are in
/var/folders/7h/_xszd0lx7wzctr3r7zhc3hs40000gn/T//Rtmpx9yVN8/downloaded_packages
But no luck. Even tried uninstalling Anaconda based on this old post: https://stackoverflow.com/questions/47424249/unable-to-install-the-package-png-on-r-possible-conflict-with-anaconda/50935430
If it makes a difference, I didn't have issues with these packages until I updated to R v4 last night
any ideas?