Since you are using a very old R version, you are forced to compile packages from source, for compiling packages in macOS, you need to install Xcode in your system (not in R) and the recommended development tools for macOS systems. https://cran.r-project.org/bin/macosx/tools/
Dear Andres, thank you so much for you quick response.
I did as instructed. downloaded all the "clang files" on the link you provided and I also installed them.
Then I tried to run the installation of "plm" again and this is the new simply error message:
That is not an error message, now that you have updated R to the latest version you have access to precompiled binaries and you don't need to compile from source yourself, so the package is already installed.