0

I have been stuck for entire day on the first line of my code.

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

When I run the code in R. Following errors occured.

Error in install.packages : type 'binary' is not supported on this platform

When I run

install.packages("rvest")

The following errors occurred

> install.packages("rvest")
also installing the dependencies ‘cli’, ‘pillar’, ‘vctrs’, ‘lifecycle’, ‘rlang’, ‘tibble’, ‘xml2’

trying URL 'http://cran.rstudio.com/src/contrib/cli_3.4.1.tar.gz'
Content type 'application/x-gzip' length 540044 bytes (527 KB)
==================================================
downloaded 527 KB

trying URL 'http://cran.rstudio.com/src/contrib/pillar_1.8.1.tar.gz'
Content type 'application/x-gzip' length 479977 bytes (468 KB)
==================================================
downloaded 468 KB

trying URL 'http://cran.rstudio.com/src/contrib/vctrs_0.4.2.tar.gz'
Content type 'application/x-gzip' length 915859 bytes (894 KB)
==================================================
downloaded 894 KB

trying URL 'http://cran.rstudio.com/src/contrib/lifecycle_1.0.3.tar.gz'
Content type 'application/x-gzip' length 106854 bytes (104 KB)
==================================================
downloaded 104 KB

trying URL 'http://cran.rstudio.com/src/contrib/rlang_1.0.6.tar.gz'
Content type 'application/x-gzip' length 742508 bytes (725 KB)
==================================================
downloaded 725 KB

trying URL 'http://cran.rstudio.com/src/contrib/tibble_3.1.8.tar.gz'
Content type 'application/x-gzip' length 672336 bytes (656 KB)
==================================================
downloaded 656 KB

trying URL 'http://cran.rstudio.com/src/contrib/xml2_1.3.3.tar.gz'
Content type 'application/x-gzip' length 283965 bytes (277 KB)
==================================================
downloaded 277 KB

trying URL 'http://cran.rstudio.com/src/contrib/rvest_1.0.3.tar.gz'
Content type 'application/x-gzip' length 94659 bytes (92 KB)
==================================================
downloaded 92 KB

* installing *source* package ‘cli’ ...
** package ‘cli’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
I"/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/include" -DNDEBUG   -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/huihui/opt/anaconda3/envs/huihuiR/include  -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I/Users/huihui/opt/anaconda3/envs/huihuiR/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/huihui/opt/anaconda3/envs/huihuiR=/usr/local/src/conda-prefix  -c win-utf8.c -o win-utf8.o
x86_64-apple-darwin13.4.0-clang -I"/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/include" -DNDEBUG   -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/huihui/opt/anaconda3/envs/huihuiR/include  -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I/Users/huihui/opt/anaconda3/envs/huihuiR/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/huihui/opt/anaconda3/envs/huihuiR=/usr/local/src/conda-prefix  -c winfiles.c -o winfiles.o
x86_64-apple-darwin13.4.0-clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/lib -Wl,-dead_strip_dylibs -Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,/Users/huihui/opt/anaconda3/envs/huihuiR/lib -L/Users/huihui/opt/anaconda3/envs/huihuiR/lib -o cli.dylib ansi.o cleancall.o diff.o errors.o glue.o init.o md5.o progress-altrep.o progress.o sha256.o thread.o tty.o utf8.o utils.o vt.o vtparse.o vtparse_table.o win-utf8.o winfiles.o -L/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/lib -lR -Wl,-framework -Wl,CoreFoundation
ld: warning: -pie being ignored. It is only used when linking a main executable
ld: unsupported tapi file type '!tapi-tbd' in YAML file '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd' for architecture x86_64
clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/share/make/shlib.mk:6: cli.dylib] Error 1
ERROR: compilation failed for package ‘cli’
* removing ‘/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/library/cli’
* restoring previous ‘/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/library/cli’
Warning in install.packages :
  installation of package ‘cli’ had non-zero exit status
* installing *source* package ‘rlang’ ...
** package ‘rlang’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
x86_64-apple-darwin13.4.0-clang -I"/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/include" -DNDEBUG -I./rlang/  -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/huihui/opt/anaconda3/envs/huihuiR/include  -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I/Users/huihui/opt/anaconda3/envs/huihuiR/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/huihui/opt/anaconda3/envs/huihuiR=/usr/local/src/conda-prefix  -c capture.c -o capture.o
x86_64-apple-darwin13.4.0-clang -I"/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/include" -DNDEBUG -I./rlang/  -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/huihui/opt/anaconda3/envs/huihuiR/include  -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I/Users/huihui/opt/anaconda3/envs/huihuiR/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/huihui/opt/anaconda3/envs/huihuiR=/usr/local/src/conda-prefix  -c internal.c -o internal.o
x86_64-apple-darwin13.4.0-clang++ -std=gnu++11 -I"/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/include" -DNDEBUG -I./rlang/  -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/huihui/opt/anaconda3/envs/huihuiR/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/huihui/opt/anaconda3/envs/huihuiR/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/huihui/opt/anaconda3/envs/huihuiR=/usr/local/src/conda-prefix  -c rlang-rcc.cpp -o rlang-rcc.o
x86_64-apple-darwin13.4.0-clang -I"/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/include" -DNDEBUG -I./rlang/  -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/huihui/opt/anaconda3/envs/huihuiR/include  -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I/Users/huihui/opt/anaconda3/envs/huihuiR/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/huihui/opt/anaconda3/envs/huihuiR=/usr/local/src/conda-prefix  -c rlang.c -o rlang.o
x86_64-apple-darwin13.4.0-clang -I"/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/include" -DNDEBUG -I./rlang/  -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/huihui/opt/anaconda3/envs/huihuiR/include  -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I/Users/huihui/opt/anaconda3/envs/huihuiR/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/huihui/opt/anaconda3/envs/huihuiR=/usr/local/src/conda-prefix  -c version.c -o version.o
x86_64-apple-darwin13.4.0-clang++ -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/lib -Wl,-dead_strip_dylibs -Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,/Users/huihui/opt/anaconda3/envs/huihuiR/lib -L/Users/huihui/opt/anaconda3/envs/huihuiR/lib -o rlang.dylib capture.o internal.o rlang-rcc.o rlang.o version.o -L/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/lib -lR -Wl,-framework -Wl,CoreFoundation
ld: warning: -pie being ignored. It is only used when linking a main executable
ld: unsupported tapi file type '!tapi-tbd' in YAML file '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libSystem.tbd' for architecture x86_64
clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/share/make/shlib.mk:6: rlang.dylib] Error 1
ERROR: compilation failed for package ‘rlang’
* removing ‘/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/library/rlang’
* restoring previous ‘/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/library/rlang’
Warning in install.packages :
  installation of package ‘rlang’ had non-zero exit status
* installing *source* package ‘xml2’ ...
** package ‘xml2’ successfully unpacked and MD5 sums checked
** using staged installation
Found pkg-config cflags and libs!
Using PKG_CFLAGS=-I/Users/huihui/opt/anaconda3/envs/huihuiR/include/libxml2 -I/Users/huihui/opt/anaconda3/envs/huihuiR/include
Using PKG_LIBS=-L/Users/huihui/opt/anaconda3/envs/huihuiR/lib -lxml2 -L/Users/huihui/opt/anaconda3/envs/huihuiR/lib -lz -L/Users/huihui/opt/anaconda3/envs/huihuiR/lib -llzma -lpthread -L/Users/huihui/opt/anaconda3/envs/huihuiR/lib -liconv -L/Users/huihui/opt/anaconda3/envs/huihuiR/lib -licui18n -licuuc -licudata -lm
** libs
x86_64-apple-darwin13.4.0-clang++ -std=gnu++11 -I"/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/include" -DNDEBUG -I../inst/include -I/Users/huihui/opt/anaconda3/envs/huihuiR/include/libxml2 -I/Users/huihui/opt/anaconda3/envs/huihuiR/include -DUCHAR_TYPE=wchar_t -DU_SHOW_CPLUSPLUS_API=0  -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/huihui/opt/anaconda3/envs/huihuiR/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/huihui/opt/anaconda3/envs/huihuiR/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/huihui/opt/anaconda3/envs/huihuiR=/usr/local/src/conda-prefix  -c connection.cpp -o connection.o
x86_64-apple-darwin13.4.0-clang -I"/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/include" -DNDEBUG -I../inst/include -I/Users/huihui/opt/anaconda3/envs/huihuiR/include/libxml2 -I/Users/huihui/opt/anaconda3/envs/huihuiR/include -DUCHAR_TYPE=wchar_t -DU_SHOW_CPLUSPLUS_API=0  -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/huihui/opt/anaconda3/envs/huihuiR/include  -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I/Users/huihui/opt/anaconda3/envs/huihuiR/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/huihui/opt/anaconda3/envs/huihuiR=/usr/local/src/conda-prefix  -c init.c -o init.o
x86_64-apple-darwin13.4.0-clang++ -std=gnu++11 -I"/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/include" -DNDEBUG -I../inst/include -I/Users/huihui/opt/anaconda3/envs/huihuiR/include/libxml2 -I/Users/huihui/opt/anaconda3/envs/huihuiR/include -DUCHAR_TYPE=wchar_t -DU_SHOW_CPLUSPLUS_API=0  -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/huihui/opt/anaconda3/envs/huihuiR/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/huihui/opt/anaconda3/envs/huihuiR/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/huihui/opt/anaconda3/envs/huihuiR=/usr/local/src/conda-prefix  -c xml2_doc.cpp -o xml2_doc.o
x86_64-apple-darwin13.4.0-clang++ -std=gnu++11 -I"/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/include" -DNDEBUG -I../inst/include -I/Users/huihui/opt/anaconda3/envs/huihuiR/include/libxml2 -I/Users/huihui/opt/anaconda3/envs/huihuiR/include -DUCHAR_TYPE=wchar_t -DU_SHOW_CPLUSPLUS_API=0  -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/huihui/opt/anaconda3/envs/huihuiR/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/huihui/opt/anaconda3/envs/huihuiR/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/huihui/opt/anaconda3/envs/huihuiR=/usr/local/src/conda-prefix  -c xml2_init.cpp -o xml2_init.o
x86_64-apple-darwin13.4.0-clang++ -std=gnu++11 -I"/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/include" -DNDEBUG -I../inst/include -I/Users/huihui/opt/anaconda3/envs/huihuiR/include/libxml2 -I/Users/huihui/opt/anaconda3/envs/huihuiR/include -DUCHAR_TYPE=wchar_t -DU_SHOW_CPLUSPLUS_API=0  -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/huihui/opt/anaconda3/envs/huihuiR/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/huihui/opt/anaconda3/envs/huihuiR/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/huihui/opt/anaconda3/envs/huihuiR=/usr/local/src/conda-prefix  -c xml2_namespace.cpp -o xml2_namespace.o
x86_64-apple-darwin13.4.0-clang++ -std=gnu++11 -I"/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/include" -DNDEBUG -I../inst/include -I/Users/huihui/opt/anaconda3/envs/huihuiR/include/libxml2 -I/Users/huihui/opt/anaconda3/envs/huihuiR/include -DUCHAR_TYPE=wchar_t -DU_SHOW_CPLUSPLUS_API=0  -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/huihui/opt/anaconda3/envs/huihuiR/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/huihui/opt/anaconda3/envs/huihuiR/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/huihui/opt/anaconda3/envs/huihuiR=/usr/local/src/conda-prefix  -c xml2_node.cpp -o xml2_node.o
x86_64-apple-darwin13.4.0-clang++ -std=gnu++11 -I"/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/include" -DNDEBUG -I../inst/include -I/Users/huihui/opt/anaconda3/envs/huihuiR/include/libxml2 -I/Users/huihui/opt/anaconda3/envs/huihuiR/include -DUCHAR_TYPE=wchar_t -DU_SHOW_CPLUSPLUS_API=0  -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/huihui/opt/anaconda3/envs/huihuiR/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/huihui/opt/anaconda3/envs/huihuiR/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/huihui/opt/anaconda3/envs/huihuiR=/usr/local/src/conda-prefix  -c xml2_output.cpp -o xml2_output.o
x86_64-apple-darwin13.4.0-clang++ -std=gnu++11 -I"/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/include" -DNDEBUG -I../inst/include -I/Users/huihui/opt/anaconda3/envs/huihuiR/include/libxml2 -I/Users/huihui/opt/anaconda3/envs/huihuiR/include -DUCHAR_TYPE=wchar_t -DU_SHOW_CPLUSPLUS_API=0  -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/huihui/opt/anaconda3/envs/huihuiR/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/huihui/opt/anaconda3/envs/huihuiR/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/huihui/opt/anaconda3/envs/huihuiR=/usr/local/src/conda-prefix  -c xml2_schema.cpp -o xml2_schema.o
x86_64-apple-darwin13.4.0-clang++ -std=gnu++11 -I"/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/include" -DNDEBUG -I../inst/include -I/Users/huihui/opt/anaconda3/envs/huihuiR/include/libxml2 -I/Users/huihui/opt/anaconda3/envs/huihuiR/include -DUCHAR_TYPE=wchar_t -DU_SHOW_CPLUSPLUS_API=0  -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/huihui/opt/anaconda3/envs/huihuiR/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/huihui/opt/anaconda3/envs/huihuiR/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/huihui/opt/anaconda3/envs/huihuiR=/usr/local/src/conda-prefix  -c xml2_url.cpp -o xml2_url.o
x86_64-apple-darwin13.4.0-clang++ -std=gnu++11 -I"/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/include" -DNDEBUG -I../inst/include -I/Users/huihui/opt/anaconda3/envs/huihuiR/include/libxml2 -I/Users/huihui/opt/anaconda3/envs/huihuiR/include -DUCHAR_TYPE=wchar_t -DU_SHOW_CPLUSPLUS_API=0  -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/huihui/opt/anaconda3/envs/huihuiR/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/huihui/opt/anaconda3/envs/huihuiR/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/huihui/opt/anaconda3/envs/huihuiR=/usr/local/src/conda-prefix  -c xml2_xpath.cpp -o xml2_xpath.o
x86_64-apple-darwin13.4.0-clang++ -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/lib -Wl,-dead_strip_dylibs -Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,/Users/huihui/opt/anaconda3/envs/huihuiR/lib -L/Users/huihui/opt/anaconda3/envs/huihuiR/lib -o xml2.dylib connection.o init.o xml2_doc.o xml2_init.o xml2_namespace.o xml2_node.o xml2_output.o xml2_schema.o xml2_url.o xml2_xpath.o -L/Users/huihui/opt/anaconda3/envs/huihuiR/lib -lxml2 -L/Users/huihui/opt/anaconda3/envs/huihuiR/lib -lz -L/Users/huihui/opt/anaconda3/envs/huihuiR/lib -llzma -lpthread -L/Users/huihui/opt/anaconda3/envs/huihuiR/lib -liconv -L/Users/huihui/opt/anaconda3/envs/huihuiR/lib -licui18n -licuuc -licudata -lm -L/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/lib -lR -Wl,-framework -Wl,CoreFoundation
ld: warning: -pie being ignored. It is only used when linking a main executable
ld: unsupported tapi file type '!tapi-tbd' in YAML file '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib/libpthread.tbd' for architecture x86_64
clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/share/make/shlib.mk:6: xml2.dylib] Error 1
ERROR: compilation failed for package ‘xml2’
* removing ‘/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/library/xml2’
* restoring previous ‘/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/library/xml2’
Warning in install.packages :
  installation of package ‘xml2’ had non-zero exit status
* installing *source* package ‘vctrs’ ...
** package ‘vctrs’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
I"/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/include" -DNDEBUG -I./rlang  -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/huihui/opt/anaconda3/envs/huihuiR/include  -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I/Users/huihui/opt/anaconda3/envs/huihuiR/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/huihui/opt/anaconda3/envs/huihuiR=/usr/local/src/conda-prefix  -c utils-dispatch.c -o utils-dispatch.o
x86_64-apple-darwin13.4.0-clang -I"/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/include" -DNDEBUG -I./rlang  -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/huihui/opt/anaconda3/envs/huihuiR/include  -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I/Users/huihui/opt/anaconda3/envs/huihuiR/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/huihui/opt/anaconda3/envs/huihuiR=/usr/local/src/conda-prefix  -c utils.c -o utils.o
x86_64-apple-darwin13.4.0-clang -I"/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/include" -DNDEBUG -I./rlang  -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/huihui/opt/anaconda3/envs/huihuiR/include  -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I/Users/huihui/opt/anaconda3/envs/huihuiR/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/huihui/opt/anaconda3/envs/huihuiR=/usr/local/src/conda-prefix  -c vctrs-core.c -o vctrs-core.o
x86_64-apple-darwin13.4.0-clang -I"/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/include" -DNDEBUG -I./rlang  -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/huihui/opt/anaconda3/envs/huihuiR/include  -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I/Users/huihui/opt/anaconda3/envs/huihuiR/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/huihui/opt/anaconda3/envs/huihuiR=/usr/local/src/conda-prefix  -c version.c -o version.o
x86_64-apple-darwin13.4.0-clang++ -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/lib -Wl,-dead_strip_dylibs -Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,/Users/huihui/opt/anaconda3/envs/huihuiR/lib -L/Users/huihui/opt/anaconda3/envs/huihuiR/lib -o vctrs.dylib altrep-rle.o altrep.o arg-counter.o arg.o assert.o bind.o c-unchop.o c.o callables.o cast-bare.o cast-dispatch.o cast.o compare.o complete.o conditions.o dictionary.o dim.o empty.o equal.o fields.o fill.o globals.o group.o growable.o hash.o init.o interval.o match-joint.o match.o names.o order-collate.o order-groups.o order-sortedness.o order-truelength.o order.o poly-op.o proxy-restore.o proxy.o ptype-common.o ptype.o ptype2-dispatch.o ptype2.o rank.o rep.o rlang-dev.o rlang-rcc.o rlang.o runs.o shape.o size-common.o size.o slice-array.o slice-assign-array.o slice-assign.o slice-chop.o slice-interleave.o slice.o split.o subscript-loc.o subscript.o translate.o type-data-frame.o type-date-time.o type-factor.o type-info.o type-integer64.o type-tibble.o typeof2-s3.o typeof2.o unspecified.o utils-dispatch.o utils.o vctrs-core.o version.o -L/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/lib -lR -Wl,-framework -Wl,CoreFoundation
ld: warning: -pie being ignored. It is only used when linking a main executable
ld: unsupported tapi file type '!tapi-tbd' in YAML file '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks//CoreFoundation.framework/CoreFoundation.tbd' for architecture x86_64
clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/share/make/shlib.mk:6: vctrs.dylib] Error 1
ERROR: compilation failed for package ‘vctrs’
* removing ‘/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/library/vctrs’
Warning in install.packages :
  installation of package ‘vctrs’ had non-zero exit status
* installing *source* package ‘lifecycle’ ...
** package ‘lifecycle’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  namespace ‘rlang’ 0.3.4 is being loaded, but >= 1.0.6 is required
Calls: <Anonymous> ... withCallingHandlers -> loadNamespace -> namespaceImport -> loadNamespace
Execution halted
ERROR: lazy loading failed for package ‘lifecycle’
* removing ‘/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/library/lifecycle’
Warning in install.packages :
  installation of package ‘lifecycle’ had non-zero exit status
ERROR: dependencies ‘lifecycle’, ‘vctrs’ are not available for package ‘pillar’
* removing ‘/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/library/pillar’
Warning in install.packages :
  installation of package ‘pillar’ had non-zero exit status
ERROR: dependencies ‘lifecycle’, ‘pillar’, ‘vctrs’ are not available for package ‘tibble’
* removing ‘/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/library/tibble’
Warning in install.packages :
  installation of package ‘tibble’ had non-zero exit status
ERROR: dependencies ‘lifecycle’, ‘tibble’ are not available for package ‘rvest’
* removing ‘/Users/huihui/opt/anaconda3/envs/huihuiR/lib/R/library/rvest’
Warning in install.packages :
  installation of package ‘rvest’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/q1/0hwp241s4y3b2cbddc7nr48m0000gn/T/RtmpaDMtz0/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done

I have also tried something like this as I found on the internet.

sudo apt-get install -y libxml2-dev libcurl4-openssl-dev libssl-dev

However as I am using macos I get errors like apt-get command not found, so I tried a few commands with brew but not sure if it is correct.

This is my first time using R and installing rvest. Any help would be much appreciated. Thank you guys!

Phil
  • 7,287
  • 3
  • 36
  • 66
  • you first need to resolve the installation problems with the depended packages lifecycle pillar vctrs tibble. try installing these packages first. I wonder why tibble does not install it is a pretty well known package. can you show the error message when you do install.package("tibble") ? – Dimitrios Zacharatos Oct 13 '22 at 12:33
  • @DimitriosZacharatos Hi, thank you for your response. It shows the same error. Actually no matter what packages I try, it will have this error. Warning in install.packages : installation of package 'tibble' had non-zero exit status' – Zeyu Xanthus Wang Oct 13 '22 at 12:56
  • Are you using a MAC? I do dot know about macs but sudo apt is used in linux. I have read the error and you seem to have a problem with a C++ compiler. you will need to install a C++ a clang library or something like that in your OS so your system can compile these packages. I do not know how to do that on MAC – Dimitrios Zacharatos Oct 13 '22 at 13:04
  • do you have xcode installed? https://community.rstudio.com/t/error-compilation-failed-for-package-rlang/26886 – Dimitrios Zacharatos Oct 13 '22 at 13:06
  • @DimitriosZacharatos Yea, I am using a mac. Thanks for your help, appreciate your time. – Zeyu Xanthus Wang Oct 13 '22 at 13:06
  • @DimitriosZacharatos yup I have it installed. – Zeyu Xanthus Wang Oct 13 '22 at 13:12
  • Try adding `type = "binary"` option to the install package function. Whenever possible I avoid downloading and compiling the source code. – Dave2e Oct 14 '22 at 16:57

1 Answers1

0

This might be the main issue as rvest needs lifecycle which needs a later version of rlang.

Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : namespace ‘rlang’ 0.3.4 is being loaded, but >= 1.0.6 is required

Close any open project, start a new session (rlang is usually depended by a lot of other packages) and then update rlang. After this, try installing rvest again.

nviraj
  • 1