Be sure that you have the latest version of XCode and install the command line utilities (xcode-select --install).
The library is lib (singular) and it should have
$ 521: ls -l
total 21352
-rwxrwxr-x 1 root admin 3.5M Apr 26 09:42 libR.dylib*
drwxrwxr-x 3 root admin 96B Apr 26 09:41 libR.dylib.dSYM/
-rwxrwxr-x 1 root admin 185K Apr 26 09:42 libRblas.0.dylib*
lrwxr-xr-x 1 root admin 16B Apr 26 17:59 libRblas.dylib@ -> libRblas.0.dylib
drwxrwxr-x 3 root admin 96B Apr 26 09:41 libRblas.dylib.dSYM/
-rwxrwxr-x 1 root admin 2.1M Apr 26 09:42 libRlapack.dylib*
drwxrwxr-x 3 root admin 96B Apr 26 09:41 libRlapack.dylib.dSYM/
-rwxrwxr-x 1 root admin 825K Apr 26 09:42 libc++.1.dylib*
-rwxrwxr-x 1 root admin 212K Apr 26 09:42 libc++abi.1.dylib*
-rwxrwxr-x 1 root admin 271K Apr 26 09:42 libgcc_s.1.dylib*
-rwxrwxr-x 1 root admin 1.5M Apr 26 09:42 libgfortran.3.dylib*
-rwxrwxr-x 1 root admin 571K Apr 26 09:42 libomp.dylib*
-rwxrwxr-x 1 root admin 278K Apr 26 09:42 libquadmath.0.dylib*
-rwxrwxr-x 1 root admin 973K Apr 26 09:42 libreadline.5.2.dylib*
lrwxr-xr-x 1 root admin 21B Apr 26 17:59 libreadline.dylib@ -> libreadline.5.2.dylib
-rwxrwxr-x 1 root admin 65K Apr 26 09:42 libunwind.1.dylib*
It's for system wide R use.
All the packages live in library
The first error message was complaining about
/library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/libs
which should have
$ 528: ls -
total 1112
-rwxr-xr-x 1 rc admin 555K Apr 26 12:52 Rcpp.so*
drwxr-xr-x 3 rc admin 96B Apr 26 12:52 Rcpp.so.dSYM/
When you run `update.packages("some_package") and you see
> update.packages()
RcppArmadillo :
Version 0.9.300.2.0 installed in /Library/Frameworks/R.framework/Versions/3.6/Resources/library
Version 0.9.400.2.0 available at https://ftp.osuosl.org/pub/cran
Update? (Yes/no/cancel) y
There is a binary version available but the source version is later:
binary source needs_compilation
RcppArmadillo 0.9.300.2.0 0.9.400.2.0 TRUE
Do you want to install from sources the package which needs compilation? (Yes/no/cancel) y
installing the source package ‘RcppArmadillo’
there's about a 50% chance it will compile successfully. If you're not asked, that means you're getting a binary and you should have no problems.
Trying to fix these things manually by moving around files is a sure recipe for disaster. It will take a couple of hours, but what I'd do is 1) upgrade to Mojave, 2) install XCode, 3) install the XCode cli, 4) re-install the Mac binary from CRAN, 5) take @andresrcs' suggestion