[MAC] Error Installing Tidyverse in RStudio 1.1.456 (Installed through Anaconda)

Dear community,

I am new to RStudio and trying to install Tidyverse package using install.packages("tidyverse"), but I am getting some errors in the process (look below for log). Could anyone guide me through this?

Log:

install.packages("tidyverse")
also installing the dependencies ‘ps’, ‘processx’, ‘callr’, ‘fs’, ‘reprex’
.
.
.
clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makevars:11: px] Error 1
ERROR: compilation failed for package ‘ps’

  • removing ‘/Users/fernandopereira/anaconda3/lib/R/library/ps’
    Warning in install.packages :
    installation of package ‘ps’ had non-zero exit status
  • installing source package ‘fs’ ...
    ** package ‘fs’ successfully unpacked and MD5 sums checked
    ** libs
    x86_64-apple-darwin13.4.0-clang++ -I"/Users/fernandopereira/anaconda3/lib/R/include" -DNDEBUG -I./libuv/include -I. -pthread -I"/Users/fernandopereira/anaconda3/lib/R/library/Rcpp/include" -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 -I/Users/fernandopereira/anaconda3/include -fPIC -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -I/Users/fernandopereira/anaconda3/include -fdebug-prefix-map==/usr/local/src/conda/- -fdebug-prefix-map==/usr/local/src/conda-prefix -c error.cc -o error.o
    x86_64-apple-darwin13.4.0-clang++ -I"/Users/fernandopereira/anaconda3/lib/R/include" -DNDEBUG -I./libuv/include -I. -pthread -I"/Users/fernandopereira/anaconda3/lib/R/library/Rcpp/include" -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 -I/Users/fernandopereira/anaconda3/include -fPIC -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -I/Users/fernandopereira/anaconda3/include -fdebug-prefix-map==/usr/local/src/conda/- -fdebug-prefix-map==/usr/local/src/conda-prefix -c dir.cc -o dir.o
    x86_64-apple-darwin13.4.0-clang++ -I"/Users/fernandopereira/anaconda3/lib/R/include" -DNDEBUG -I./libuv/include -I. -pthread -I"/Users/fernandopereira/anaconda3/lib/R/library/Rcpp/include" -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 -I/Users/fernandopereira/anaconda3/include -fPIC -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -I/Users/fernandopereira/anaconda3/include -fdebug-prefix-map==/usr/local/src/conda/- -fdebug-prefix-map==/usr/local/src/conda-prefix -c utils.cc -o utils.o
    x86_64-apple-darwin13.4.0-clang++ -I"/Users/fernandopereira/anaconda3/lib/R/include" -DNDEBUG -I./libuv/include -I. -pthread -I"/Users/fernandopereira/anaconda3/lib/R/library/Rcpp/include" -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 -I/Users/fernandopereira/anaconda3/include -fPIC -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -I/Users/fernandopereira/anaconda3/include -fdebug-prefix-map==/usr/local/src/conda/- -fdebug-prefix-map==/usr/local/src/conda-prefix -c link.cc -o link.o
    x86_64-apple-darwin13.4.0-clang++ -I"/Users/fernandopereira/anaconda3/lib/R/include" -DNDEBUG -I./libuv/include -I. -pthread -I"/Users/fernandopereira/anaconda3/lib/R/library/Rcpp/include" -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 -I/Users/fernandopereira/anaconda3/include -fPIC -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -I/Users/fernandopereira/anaconda3/include -fdebug-prefix-map==/usr/local/src/conda/- -fdebug-prefix-map==/usr/local/src/conda-prefix -c path.cc -o path.o
    x86_64-apple-darwin13.4.0-clang++ -I"/Users/fernandopereira/anaconda3/lib/R/include" -DNDEBUG -I./libuv/include -I. -pthread -I"/Users/fernandopereira/anaconda3/lib/R/library/Rcpp/include" -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 -I/Users/fernandopereira/anaconda3/include -fPIC -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -I/Users/fernandopereira/anaconda3/include -fdebug-prefix-map==/usr/local/src/conda/- -fdebug-prefix-map==/usr/local/src/conda-prefix -c file.cc -o file.o
    x86_64-apple-darwin13.4.0-clang++ -I"/Users/fernandopereira/anaconda3/lib/R/include" -DNDEBUG -I./libuv/include -I. -pthread -I"/Users/fernandopereira/anaconda3/lib/R/library/Rcpp/include" -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 -I/Users/fernandopereira/anaconda3/include -fPIC -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -I/Users/fernandopereira/anaconda3/include -fdebug-prefix-map==/usr/local/src/conda/- -fdebug-prefix-map==/usr/local/src/conda-prefix -c fs.cc -o fs.o
    x86_64-apple-darwin13.4.0-clang++ -I"/Users/fernandopereira/anaconda3/lib/R/include" -DNDEBUG -I./libuv/include -I. -pthread -I"/Users/fernandopereira/anaconda3/lib/R/library/Rcpp/include" -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 -I/Users/fernandopereira/anaconda3/include -fPIC -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -I/Users/fernandopereira/anaconda3/include -fdebug-prefix-map==/usr/local/src/conda/- -fdebug-prefix-map==/usr/local/src/conda-prefix -c id.cc -o id.o
    x86_64-apple-darwin13.4.0-clang++ -I"/Users/fernandopereira/anaconda3/lib/R/include" -DNDEBUG -I./libuv/include -I. -pthread -I"/Users/fernandopereira/anaconda3/lib/R/library/Rcpp/include" -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 -I/Users/fernandopereira/anaconda3/include -fPIC -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -I/Users/fernandopereira/anaconda3/include -fdebug-prefix-map==/usr/local/src/conda/- -fdebug-prefix-map==/usr/local/src/conda-prefix -c unix/getmode.cc -o unix/getmode.o
    x86_64-apple-darwin13.4.0-clang++ -I"/Users/fernandopereira/anaconda3/lib/R/include" -DNDEBUG -I./libuv/include -I. -pthread -I"/Users/fernandopereira/anaconda3/lib/R/library/Rcpp/include" -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 -I/Users/fernandopereira/anaconda3/include -fPIC -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -I/Users/fernandopereira/anaconda3/include -fdebug-prefix-map==/usr/local/src/conda/- -fdebug-prefix-map==/usr/local/src/conda-prefix -c RcppExports.cpp -o RcppExports.o
    cp -p -f libuv/m4/lt_obsolete.m4 libuv/m4/lt~obsolete.m4
    (cd libuv
    && touch aclocal.m4
    && touch -r aclocal.m4 configure Makefile.in
    && CC="x86_64-apple-darwin13.4.0-clang" CFLAGS="-march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I/Users/fernandopereira/anaconda3/include -fdebug-prefix-map==/usr/local/src/conda/- -fdebug-prefix-map==/usr/local/src/conda-prefix -fPIC " AR="x86_64-apple-darwin13.4.0-ar" RANLIB="x86_64-apple-darwin13.4.0-ranlib" LDFLAGS="-Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,/Users/fernandopereira/anaconda3/lib -L/Users/fernandopereira/anaconda3/lib" ./configure --quiet)
    configure: error: in /private/var/folders/js/xpc01_px7m79fwngyzfqq3s80000gp/T/RtmpdFi0zR/R.INSTALL8d3e39790e83/fs/src/libuv': configure: error: C compiler cannot create executables Seeconfig.log' for more details
    make: *** [Makevars:32: libuv/Makefile] Error 77
    ERROR: compilation failed for package ‘fs’
  • removing ‘/Users/fernandopereira/anaconda3/lib/R/library/fs’
    Warning in install.packages :
    installation of package ‘fs’ had non-zero exit status
    ERROR: dependency ‘ps’ is not available for package ‘processx’
  • removing ‘/Users/fernandopereira/anaconda3/lib/R/library/processx’
    Warning in install.packages :
    installation of package ‘processx’ had non-zero exit status
    ERROR: dependency ‘processx’ is not available for package ‘callr’
  • removing ‘/Users/fernandopereira/anaconda3/lib/R/library/callr’
    Warning in install.packages :
    installation of package ‘callr’ had non-zero exit status
    ERROR: dependencies ‘callr’, ‘fs’ are not available for package ‘reprex’
  • removing ‘/Users/fernandopereira/anaconda3/lib/R/library/reprex’
    Warning in install.packages :
    installation of package ‘reprex’ had non-zero exit status
    ERROR: dependency ‘reprex’ is not available for package ‘tidyverse’
  • removing ‘/Users/fernandopereira/anaconda3/lib/R/library/tidyverse’
    Warning in install.packages :
    installation of package ‘tidyverse’ had non-zero exit status

The downloaded source packages are in
‘/private/var/folders/js/xpc01_px7m79fwngyzfqq3s80000gp/T/RtmpFcTgGD/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done

Using RStudio through Anaconda is not recommended (or supported) because they don't usually play well together. You are restricted to the tidyverse version that is available from Anaconda repositories (Check your Anaconda Navigator)

Thank you Andres!

I managed to install it via Anaconda. I am also trying to install RPostgreSQL, but I could not find that on the Anaconda's package list, I know this is a bit off the initial topic, but would you have any advice on how I could install that package?

Thank you,
Fernando

Sorry, I don't use R through Anaconda (Using a regular independent installation is much easier) but I think there should be some walk around solution for this, I would recommend you to ask this on a Anaconda oriented forum or Stack Overflow.

BTW, If you are working with a PostgreSQL database, I find odbc() package easier to work with than RPostgreSQL and is available in Anaconda.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.