Problem with library(Hmisc) and library(png)

I can install both Hmisc and png but when I try library(Hmisc) or library(png) I get this error:

Error: package or namespace load failed for ‘png’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Library/Frameworks/R.framework/Versions/4.1/Resources/library/png/libs/':
dlopen(/Library/Frameworks/R.framework/Versions/4.1/Resources/library/png/libs/, 6): Symbol not found: _inflateValidate
Referenced from: /Library/Frameworks/R.framework/Versions/4.1/Resources/library/png/libs/ (which was built for Mac OS X 10.13)
Expected in: /usr/lib/libz.1.dylib
in /Library/Frameworks/R.framework/Versions/4.1/Resources/library/png/libs/

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