Problem installing tidyverse - non zero exit status?

You are not showing the complete console output so I can't know if we are seen the actual root cause of your problem but from what I can see you are missing Xcode in your system (not in R) and the recommended development tools for macOS systems.

https://cran.r-project.org/bin/macosx/tools/

These tools are required to compile packages from source and since you are using a very old R version, you are forced to install packages this way.

Note: Please do not post screenshots, it is considered a bad practice here, post formatted code instead, here is how to do it