error after update

I reinstalled R Studio. Now I can't load almost any package. I get this error:

Error: package or namespace load failed for ‘Hmisc’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Library/Frameworks/R.framework/Versions/4.0/Resources/library/png/libs/':
dlopen(/Library/Frameworks/R.framework/Versions/4.0/Resources/library/png/libs/, 6): Symbol not found: _inflateValidate
Referenced from: /Library/Frameworks/R.framework/Versions/4.0/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.0/Resources/library/png/libs/

I also can't load some rutines that used to work with no problem:

Error in source(file.path(RutinesLocals, "carrega.llibreria.r")) :
invalid multibyte character in parser at line 16

Please help¡

macOS is sensitive to problems such as these that can arise when updating one of three components, in this case RStudio, that have to work together.

The immediate problem is a file, that is installed as part of R. Internally, it is calling something called inflateValidate that is missing from its universe.

This could be due to several reasons, but the most likely is that your macOS version is too old (such as Sierra).

Could you tell me your versions of macOS and, if possible, XCode and Quartz?

Thank you very much for you answer¡
I have MacOS Sierra version 10.12.6. I am sorry but I am very new in R and don't know much about computing¡ Have no idea what a Xcode or Quartz is.
Hope you can still help me. Thank you again

To use R and RStudio under Sierra, you would have to downversion those programs or upgrade macOS to Catalina. The latter is probably easier for the less experienced. An alternative is to use the clould-based version of RStudio, which is free for limited usage (probably more than enough for student use). See this link.

Upgrading macOS may take a few hours. If you do that make sure your machine is powered, connected with as high speed service as possible and all of your data is backed up and recoverable. If you decide to go that route, come back for help to install Quartz. XCode is only necessary for some advanced package installation that should not be attempted without an understanding of how source code is compiled under macOS.