can not install tidyverse

When I try to install tidyverse, it shows multiple errors like below. Could anyone help me? I am a new user for R.Thanks very much.

install.packages("tidyverse")
also installing the dependencies ‘fs’, ‘broom’, ‘dbplyr’, ‘dplyr’, ‘haven’, ‘modelr’, ‘readr’, ‘readxl’, ‘reprex’, ‘tidyr’

Do you want to attempt to install these from sources? (Yes/no/cancel) Yes
installing the source packages ‘fs’, ‘broom’, ‘dbplyr’, ‘dplyr’, ‘haven’, ‘modelr’, ‘readr’, ‘readxl’, ‘reprex’, ‘tidyr’, ‘tidyverse’

* installing *source* package ‘fs’ ...
** package ‘fs’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I./libuv/include -I. -pthread -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c dir.cc -o dir.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I./libuv/include -I. -pthread -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c error.cc -o error.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I./libuv/include -I. -pthread -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c file.cc -o file.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I./libuv/include -I. -pthread -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c fs.cc -o fs.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I./libuv/include -I. -pthread -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c id.cc -o id.o
In file included from id.cc:4:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/grp.h:79:25: error: unknown type name 'uuid_t'; did you mean 'uid_t'?
struct group *getgruuid(uuid_t);
                        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h:31:31: note: 'uid_t' declared here
typedef __darwin_uid_t        uid_t;
                              ^
In file included from id.cc:4:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/grp.h:80:17: error: unknown type name 'uuid_t'
int getgruuid_r(uuid_t, struct group *, char *, size_t, struct group **);
                ^
In file included from id.cc:5:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/pwd.h:114:26: error: unknown type name 'uuid_t'; did you mean 'uid_t'?
struct passwd   *getpwuuid(uuid_t);
                           ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h:31:31: note: 'uid_t' declared here
typedef __darwin_uid_t        uid_t;
                              ^
In file included from id.cc:5:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/pwd.h:115:19: error: unknown type name 'uuid_t'
int              getpwuuid_r(uuid_t, struct passwd *, char *, size_t, struct passwd **);
                             ^
In file included from id.cc:7:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:655:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/gethostuuid.h:39:17: error: unknown type name 'uuid_t'
int gethostuuid(uuid_t, const struct timespec *) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA);
                ^
In file included from id.cc:7:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:662:27: error: unknown type name 'uuid_t'; did you mean 'uid_t'?
int      getsgroups_np(int *, uuid_t);
                              ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h:31:31: note: 'uid_t' declared here
typedef __darwin_uid_t        uid_t;
                              ^
In file included from id.cc:7:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:664:27: error: unknown type name 'uuid_t'; did you mean 'uid_t'?
int      getwgroups_np(int *, uuid_t);
                              ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h:31:31: note: 'uid_t' declared here
typedef __darwin_uid_t        uid_t;
                              ^
In file included from id.cc:7:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:727:31: error: unknown type name 'uuid_t'; did you mean 'uid_t'?
int      setsgroups_np(int, const uuid_t);
                                  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h:31:31: note: 'uid_t' declared here
typedef __darwin_uid_t        uid_t;
                              ^
In file included from id.cc:7:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:729:31: error: unknown type name 'uuid_t'; did you mean 'uid_t'?
int      setwgroups_np(int, const uuid_t);
                                  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h:31:31: note: 'uid_t' declared here
typedef __darwin_uid_t        uid_t;
                              ^
9 errors generated.
make: *** [id.o] Error 1
ERROR: compilation failed for package ‘fs’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/fs’
Warning in install.packages :
  installation of package ‘fs’ had non-zero exit status
* installing *source* package ‘dplyr’ ...
** package ‘dplyr’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../inst/include -DRCPP_DEFAULT_INCLUDE_CALL=false -DCOMPILING_DPLYR -DRCPP_USING_UTF8_ERROR_STRING -DRCPP_USE_UNWIND_PROTECT -DBOOST_NO_AUTO_PTR  -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/plogr/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c RcppExports.cpp -o RcppExports.o
In file included from RcppExports.cpp:4:
In file included from ./../inst/include/dplyr.h:4:
In file included from ../inst/include/dplyr/main.h:6:
In file included from ../inst/include/dplyr/workarounds/static_assert.h:17:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config.hpp:57:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config/platform/macos.hpp:28:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config/detail/posix_features.hpp:18:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:655:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/gethostuuid.h:39:17: error: unknown type name 'uuid_t'
int gethostuuid(uuid_t, const struct timespec *) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA);
                ^
In file included from RcppExports.cpp:4:
In file included from ./../inst/include/dplyr.h:4:
In file included from ../inst/include/dplyr/main.h:6:
In file included from ../inst/include/dplyr/workarounds/static_assert.h:17:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config.hpp:57:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config/platform/macos.hpp:28:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config/detail/posix_features.hpp:18:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:662:27: error: unknown type name 'uuid_t'; did you mean 'uid_t'?
int      getsgroups_np(int *, uuid_t);
                              ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h:31:31: note: 'uid_t' declared here
typedef __darwin_uid_t        uid_t;
                              ^
In file included from RcppExports.cpp:4:
In file included from ./../inst/include/dplyr.h:4:
In file included from ../inst/include/dplyr/main.h:6:
In file included from ../inst/include/dplyr/workarounds/static_assert.h:17:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config.hpp:57:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config/platform/macos.hpp:28:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config/detail/posix_features.hpp:18:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:664:27: error: unknown type name 'uuid_t'; did you mean 'uid_t'?
int      getwgroups_np(int *, uuid_t);
                              ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h:31:31: note: 'uid_t' declared here
typedef __darwin_uid_t        uid_t;
                              ^
In file included from RcppExports.cpp:4:
In file included from ./../inst/include/dplyr.h:4:
In file included from ../inst/include/dplyr/main.h:6:
In file included from ../inst/include/dplyr/workarounds/static_assert.h:17:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config.hpp:57:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config/platform/macos.hpp:28:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config/detail/posix_features.hpp:18:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:727:31: error: unknown type name 'uuid_t'; did you mean 'uid_t'?
int      setsgroups_np(int, const uuid_t);
                                  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h:31:31: note: 'uid_t' declared here
typedef __darwin_uid_t        uid_t;
                              ^
In file included from RcppExports.cpp:4:
In file included from ./../inst/include/dplyr.h:4:
In file included from ../inst/include/dplyr/main.h:6:
In file included from ../inst/include/dplyr/workarounds/static_assert.h:17:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config.hpp:57:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config/platform/macos.hpp:28:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config/detail/posix_features.hpp:18:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:729:31: error: unknown type name 'uuid_t'; did you mean 'uid_t'?
int      setwgroups_np(int, const uuid_t);
                                  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h:31:31: note: 'uid_t' declared here
typedef __darwin_uid_t        uid_t;
                              ^
5 errors generated.
make: *** [RcppExports.o] Error 1
ERROR: compilation failed for package ‘dplyr’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/dplyr’
Warning in install.packages :
  installation of package ‘dplyr’ had non-zero exit status
* installing *source* package ‘readr’ ...
** package ‘readr’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -I. -Ircon -fPIC  -Wall -g -O2  -c Collector.cpp -o Collector.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -I. -Ircon -fPIC  -Wall -g -O2  -c CollectorGuess.cpp -o CollectorGuess.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -I. -Ircon -fPIC  -Wall -g -O2  -c Iconv.cpp -o Iconv.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -I. -Ircon -fPIC  -Wall -g -O2  -c LocaleInfo.cpp -o LocaleInfo.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -I. -Ircon -fPIC  -Wall -g -O2  -c RcppExports.cpp -o RcppExports.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -I. -Ircon -fPIC  -Wall -g -O2  -c Reader.cpp -o Reader.o
In file included from Reader.cpp:1:
In file included from ./Reader.h:3:
In file included from ./Collector.h:5:
In file included from ./DateTimeParser.h:6:
In file included from ./QiParsers.h:4:
In file included from ./boost.h:6:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/interprocess/file_mapping.hpp:15:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config.hpp:57:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config/platform/macos.hpp:28:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config/detail/posix_features.hpp:18:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:655:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/gethostuuid.h:39:17: error: unknown type name 'uuid_t'
int gethostuuid(uuid_t, const struct timespec *) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA);
                ^
In file included from Reader.cpp:1:
In file included from ./Reader.h:3:
In file included from ./Collector.h:5:
In file included from ./DateTimeParser.h:6:
In file included from ./QiParsers.h:4:
In file included from ./boost.h:6:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/interprocess/file_mapping.hpp:15:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config.hpp:57:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config/platform/macos.hpp:28:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config/detail/posix_features.hpp:18:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:662:27: error: unknown type name 'uuid_t'; did you mean 'uid_t'?
int      getsgroups_np(int *, uuid_t);
                              ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h:31:31: note: 'uid_t' declared here
typedef __darwin_uid_t        uid_t;
                              ^
In file included from Reader.cpp:1:
In file included from ./Reader.h:3:
In file included from ./Collector.h:5:
In file included from ./DateTimeParser.h:6:
In file included from ./QiParsers.h:4:
In file included from ./boost.h:6:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/interprocess/file_mapping.hpp:15:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config.hpp:57:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config/platform/macos.hpp:28:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config/detail/posix_features.hpp:18:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:664:27: error: unknown type name 'uuid_t'; did you mean 'uid_t'?
int      getwgroups_np(int *, uuid_t);
                              ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h:31:31: note: 'uid_t' declared here
typedef __darwin_uid_t        uid_t;
                              ^
In file included from Reader.cpp:1:
In file included from ./Reader.h:3:
In file included from ./Collector.h:5:
In file included from ./DateTimeParser.h:6:
In file included from ./QiParsers.h:4:
In file included from ./boost.h:6:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/interprocess/file_mapping.hpp:15:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config.hpp:57:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config/platform/macos.hpp:28:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config/detail/posix_features.hpp:18:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:727:31: error: unknown type name 'uuid_t'; did you mean 'uid_t'?
int      setsgroups_np(int, const uuid_t);
                                  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h:31:31: note: 'uid_t' declared here
typedef __darwin_uid_t        uid_t;
                              ^
In file included from Reader.cpp:1:
In file included from ./Reader.h:3:
In file included from ./Collector.h:5:
In file included from ./DateTimeParser.h:6:
In file included from ./QiParsers.h:4:
In file included from ./boost.h:6:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/interprocess/file_mapping.hpp:15:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config.hpp:57:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config/platform/macos.hpp:28:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config/detail/posix_features.hpp:18:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:729:31: error: unknown type name 'uuid_t'; did you mean 'uid_t'?
int      setwgroups_np(int, const uuid_t);
                                  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h:31:31: note: 'uid_t' declared here
typedef __darwin_uid_t        uid_t;
                              ^
5 errors generated.
make: *** [Reader.o] Error 1
ERROR: compilation failed for package ‘readr’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/readr’
Warning in install.packages :
  installation of package ‘readr’ had non-zero exit status
* installing *source* package ‘readxl’ ...
** package ‘readxl’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -Iunix -I. -DRCPP_DEFAULT_INCLUDE_CALL=false -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/progress/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c RcppExports.cpp -o RcppExports.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -Iunix -I. -DRCPP_DEFAULT_INCLUDE_CALL=false -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/progress/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c XlsWorkBook.cpp -o XlsWorkBook.o
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -Iunix -I. -DRCPP_DEFAULT_INCLUDE_CALL=false -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/progress/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -Wall -g -O2  -c XlsWorkSheet.cpp -o XlsWorkSheet.o
In file included from XlsWorkSheet.cpp:3:
In file included from ./XlsWorkSheet.h:7:
In file included from ./Spinner.h:4:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/progress/include/RProgress.h:6:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:655:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/gethostuuid.h:39:17: error: unknown type name 'uuid_t'
int gethostuuid(uuid_t, const struct timespec *) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA);
                ^
In file included from XlsWorkSheet.cpp:3:
In file included from ./XlsWorkSheet.h:7:
In file included from ./Spinner.h:4:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/progress/include/RProgress.h:6:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:662:27: error: unknown type name 'uuid_t'; did you mean 'uid_t'?
int      getsgroups_np(int *, uuid_t);
                              ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h:31:31: note: 'uid_t' declared here
typedef __darwin_uid_t        uid_t;
                              ^
In file included from XlsWorkSheet.cpp:3:
In file included from ./XlsWorkSheet.h:7:
In file included from ./Spinner.h:4:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/progress/include/RProgress.h:6:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:664:27: error: unknown type name 'uuid_t'; did you mean 'uid_t'?
int      getwgroups_np(int *, uuid_t);
                              ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h:31:31: note: 'uid_t' declared here
typedef __darwin_uid_t        uid_t;
                              ^
In file included from XlsWorkSheet.cpp:3:
In file included from ./XlsWorkSheet.h:7:
In file included from ./Spinner.h:4:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/progress/include/RProgress.h:6:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:727:31: error: unknown type name 'uuid_t'; did you mean 'uid_t'?
int      setsgroups_np(int, const uuid_t);
                                  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h:31:31: note: 'uid_t' declared here
typedef __darwin_uid_t        uid_t;
                              ^
In file included from XlsWorkSheet.cpp:3:
In file included from ./XlsWorkSheet.h:7:
In file included from ./Spinner.h:4:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/progress/include/RProgress.h:6:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/unistd.h:729:31: error: unknown type name 'uuid_t'; did you mean 'uid_t'?
int      setwgroups_np(int, const uuid_t);
                                  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/_types/_uid_t.h:31:31: note: 'uid_t' declared here
typedef __darwin_uid_t        uid_t;
                              ^
5 errors generated.
make: *** [XlsWorkSheet.o] Error 1
ERROR: compilation failed for package ‘readxl’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/readxl’
Warning in install.packages :
  installation of package ‘readxl’ had non-zero exit status
ERROR: dependency ‘dplyr’ is not available for package ‘dbplyr’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/dbplyr’
Warning in install.packages :
  installation of package ‘dbplyr’ had non-zero exit status
ERROR: dependency ‘readr’ is not available for package ‘haven’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/haven’
Warning in install.packages :
  installation of package ‘haven’ had non-zero exit status
ERROR: dependency ‘fs’ is not available for package ‘reprex’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/reprex’
Warning in install.packages :
  installation of package ‘reprex’ had non-zero exit status
ERROR: dependency ‘dplyr’ is not available for package ‘tidyr’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/tidyr’
Warning in install.packages :
  installation of package ‘tidyr’ had non-zero exit status
ERROR: dependencies ‘dplyr’, ‘tidyr’ are not available for package ‘broom’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/broom’
Warning in install.packages :
  installation of package ‘broom’ had non-zero exit status
ERROR: dependencies ‘broom’, ‘dplyr’, ‘tidyr’ are not available for package ‘modelr’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/modelr’
Warning in install.packages :
  installation of package ‘modelr’ had non-zero exit status
ERROR: dependencies ‘broom’, ‘dbplyr’, ‘dplyr’, ‘haven’, ‘modelr’, ‘readr’, ‘readxl’, ‘reprex’, ‘tidyr’ are not available for package ‘tidyverse’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/tidyverse’
Warning in install.packages :
  installation of package ‘tidyverse’ had non-zero exit status

The downloaded source packages are in
	‘/private/var/folders/7j/hcjprbz508g8hw4k1qmp18g00000gn/T/Rtmpg7iRfK/downloaded_packages’

Hello, as you're on MacOS unfortunately this has its quirks.
It will probably be less headaches for you, if you can rely on precompiled binaries for MacOS
when you go through the install.packages in the normal way and you come across

Do you want to attempt to install these from sources? (Yes/no/cancel) 

Yes, means to compile from source ( this can be an issue as you will need your computer configured in a precise way, that I'm out of my depth to help you with)
Cancel, means don't install the packages
no, means try to install them from binaries.
or alternatively use the form

install.packages("tidyverse", type = "binary")

where possible.

I have tried that, still can not install packages. Also, I find i can not intall shiny package, too. What else I can do? Thank you very much for your immediate reply.

My mac in the newest version, with the newest version of R and Rstudio. I have installed clang and gfortran from CRAN. Actually i found that when I install any packages involving complication, it would fail like below. Please help me. Thank you.5 errors generated.
make: *** [XlsWorkSheet.o] Error 1
ERROR: compilation failed for package ‘readxl’

  • removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/readxl’
    Warning in install.packages :
    installation of package ‘readxl’ had non-zero exit status
    ERROR: dependency ‘dplyr’ is not available for package ‘dbplyr’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/dbplyr’
    Warning in install.packages :
    installation of package ‘dbplyr’ had non-zero exit status
    ERROR: dependency ‘readr’ is not available for package ‘haven’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/haven’
    Warning in install.packages :
    installation of package ‘haven’ had non-zero exit status
    ERROR: dependency ‘fs’ is not available for package ‘reprex’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/reprex’
    Warning in install.packages :
    installation of package ‘reprex’ had non-zero exit status
    ERROR: dependency ‘dplyr’ is not available for package ‘tidyr’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/tidyr’
    Warning in install.packages :
    installation of package ‘tidyr’ had non-zero exit status
    ERROR: dependencies ‘dplyr’, ‘tidyr’ are not available for package ‘broom’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/broom’
    Warning in install.packages :
    installation of package ‘broom’ had non-zero exit status
    ERROR: dependencies ‘broom’, ‘dplyr’, ‘tidyr’ are not available for package ‘modelr’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/modelr’
    Warning in install.packages :
    installation of package ‘modelr’ had non-zero exit status
    ERROR: dependencies ‘broom’, ‘dbplyr’, ‘dplyr’, ‘haven’, ‘modelr’, ‘readr’, ‘readxl’, ‘reprex’, ‘tidyr’ are not available for package ‘tidyverse’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/tidyverse’
    Warning in install.packages :
    installation of package ‘tidyverse’ had non-zero exit status

The downloaded source packages are in
‘/private/var/folders/7j/hcjprbz508g8hw4k1qmp18g00000gn/T/RtmpTsh8rB/downloaded_packages’

There seems to be a glitch with RStudio's Mac repositories -- could you open the R app (not RStudio) and install there, then close the R app and see if you can load (not install) the packages in RStudio?

You mean install packages in R app? Use the same command? Sorry I am a brand-new. Thank you

I tried install in R app, and the same problem happened.
ERROR: compilation failed for package ‘readxl’

  • removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/readxl’
    ERROR: dependency ‘dplyr’ is not available for package ‘dbplyr’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/dbplyr’
    ERROR: dependency ‘readr’ is not available for package ‘haven’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/haven’
    ERROR: dependency ‘fs’ is not available for package ‘reprex’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/reprex’
    ERROR: dependency ‘dplyr’ is not available for package ‘tidyr’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/tidyr’
    ERROR: dependencies ‘dplyr’, ‘tidyr’ are not available for package ‘broom’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/broom’
    ERROR: dependencies ‘broom’, ‘dplyr’, ‘tidyr’ are not available for package ‘modelr’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/modelr’
    ERROR: dependencies ‘broom’, ‘dbplyr’, ‘dplyr’, ‘haven’, ‘modelr’, ‘readr’, ‘readxl’, ‘reprex’, ‘tidyr’ are not available for package ‘tidyverse’
  • removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/tidyverse’

The downloaded source packages are in
‘/private/var/folders/7j/hcjprbz508g8hw4k1qmp18g00000gn/T/RtmpFG5Ork/downloaded_packages’
What else can i try? Thank you!

Could you post a screenshot of what happens when you run install.packages('tidyverse') in the R app?

This isn't a screenshot -- I was hoping to see if there were clues visible in the app itself.

Then how can I get a screenshot? Could you please give me an example?
Thank you

That is still not a screenshot -- could you delete the previous posts of the console output? They'll make it difficult to read the thread. Thanks.

OK. I have deleted it. Then what should I do? Please help me!

Do you know what screenshot is?


Is this the screenshot?

Good! Now could you take it of the whole R app window after scrolling to where you executed the install command?


I am not sure whether this is the portion that matters

OK, now try this command, instead:

install.packages('tidyverse', repos = 'https://mirror.las.iastate.edu/CRAN/')

and see if that helps.

1 Like

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