Unable to install devtool and rstan packages after installing Command Line Tools and HomeBrew. I also have followed the instructions on github website to download C++ compiler to install rstan but still no luck. Any help will me greatly appreciated!!
Warning messages:
1: In install.packages("devtools") :
installation of package ‘pkgload’ had non-zero exit status
2: In install.packages("devtools") :
installation of package ‘roxygen2’ had non-zero exit status
3: In install.packages("devtools") :
installation of package ‘devtools’ had non-zero exit status
There are binary versions available but the source versions are
later:
binary source needs_compilation
pkgload 1.0.2 1.1.0 TRUE
roxygen2 7.1.0 7.1.1 TRUE
devtools 2.2.2 2.3.1 FALSE
Do you want to install from sources the packages which need compilation? (Yes/no/cancel) yes
installing the source packages ‘pkgload’, ‘roxygen2’, ‘devtools’
installing source package ‘pkgload’ ...
** package ‘pkgload’ successfully unpacked and MD5 sums checked
** libs
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c unlock.c -o unlock.o
clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o pkgload.so unlock.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /Library/Frameworks/R.framework/Versions/3.5/Resources/library/pkgload/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error: package or namespace load failed for ‘pkgload’:
.onLoad failed in loadNamespace() for 'pkgload', details:
call: loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]])
error: there is no package called ‘backports’
Error: loading failed
Execution halted
ERROR: loading failed
removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/pkgload’
ERROR: dependency ‘pkgload’ is not available for package ‘roxygen2’
removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/roxygen2’
ERROR: dependencies ‘pkgload’, ‘roxygen2’ are not available for package ‘devtools’
The downloaded source packages are in
‘/private/var/folders/5p/6hnb9ms90zv0fxdrl8995gv40000gn/T/RtmpcOPcmH/downloaded_packages’
Warning messages:
1: In install.packages("devtools") :
installation of package ‘pkgload’ had non-zero exit status
2: In install.packages("devtools") :
installation of package ‘roxygen2’ had non-zero exit status
3: In install.packages("devtools") :
installation of package ‘devtools’ had non-zero exit status
If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it: