Installation of R package haven failed during deploying Rmarkdown in Rstudio connect

Hi,

Installed haven succcessfully in Rstudio IDE. When I was deploying the Rmarkdown, I am getting failure for haven installation. Pasting the error below. Please someone help me on this topic.

[Connect] Bundle requested R version 4.0.0; using /opt/R/4.0.0/bin/R which has version 4.0.0
[Connect] 2021/06/07 16:58:18.118400142 arguments: /opt/R/4.0.0/bin/R --no-save -s -f /opt/rstudio-connect/R/packrat_restore.R

[Connect] 2021/06/07 16:58:21.844549222 Installing haven (2.4.1) ...
[Connect] 2021/06/07 16:58:22.092723070 curl: HTTP 200
[Connect] 2021/06/07 16:58:56.774032954 [1] "Command failed (1)\n\nFailed to run system command:\n\n\t'/opt/R/4.0.0/lib/R/bin/R' --vanilla CMD INSTALL --preclean '/opt/rstudio-connect/mnt/tmp/RtmpQrlvzO/packrat-install-10524f1a9766/haven' --library='/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0' --install-tests --no-docs --no-multiarch --no-demo \n\nThe command failed with output:\n* installing source package ‘haven’ ...\n** package ‘haven’ successfully unpacked and MD5 sums checked\n** using staged installation\n** libs\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c tagged_na.c -o tagged_na.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/readstat_parser.c -o reads
[Connect] tat/readstat_parser.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/readstat_bits.c -o readstat/readstat_bits.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/readstat_metadata.c -o readstat/readstat_metadata.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/readstat_io_unistd.c -o readstat/readstat_io_unistd.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2
[Connect] -c readstat/readstat_variable.c -o readstat/readstat_variable.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/readstat_writer.c -o readstat/readstat_writer.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/readstat_error.c -o readstat/readstat_error.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/readstat_convert.c -o readstat/readstat_convert.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -I
[Connect] readstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/CKHashTable.c -o readstat/CKHashTable.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/readstat_malloc.c -o readstat/readstat_malloc.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/readstat_value.c -o readstat/readstat_value.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/sas/readstat_xport_write.c -o readstat/sas/readstat_xport_write.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0
[Connect] /cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/sas/readstat_sas7bcat_read.c -o readstat/sas/readstat_sas7bcat_read.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/sas/readstat_sas7bdat_write.c -o readstat/sas/readstat_sas7bdat_write.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/sas/readstat_sas7bcat_write.c -o readstat/sas/readstat_sas7bcat_write.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/sas/ieee.c -o readstat/sas/ieee.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/i
[Connect] nclude" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/sas/readstat_xport_read.c -o readstat/sas/readstat_xport_read.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/sas/readstat_sas.c -o readstat/sas/readstat_sas.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/sas/readstat_sas_rle.c -o readstat/sas/readstat_sas_rle.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/sas/readstat_xport.c -o read
[Connect] stat/sas/readstat_xport.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/sas/readstat_sas7bdat_read.c -o readstat/sas/readstat_sas7bdat_read.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/spss/readstat_sav_compress.c -o readstat/spss/readstat_sav_compress.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/spss/readstat_spss_parse.c -o readstat/spss/readstat_spss_parse.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include'
[Connect] -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/spss/readstat_sav_read.c -o readstat/spss/readstat_sav_read.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/spss/readstat_por_read.c -o readstat/spss/readstat_por_read.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/spss/readstat_sav.c -o readstat/spss/readstat_sav.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/spss/readstat_zsav_compress.c -o readstat/spss/readstat_zsav_compress.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBU
[Connect] G -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/spss/readstat_sav_parse_timestamp.c -o readstat/spss/readstat_sav_parse_timestamp.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/spss/readstat_zsav_read.c -o readstat/spss/readstat_zsav_read.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/spss/readstat_sav_write.c -o readstat/spss/readstat_sav_write.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/spss
[Connect] /readstat_spss.c -o readstat/spss/readstat_spss.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/spss/readstat_por.c -o readstat/spss/readstat_por.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/spss/readstat_por_write.c -o readstat/spss/readstat_por_write.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/spss/readstat_zsav_write.c -o readstat/spss/readstat_zsav_write.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include'
[Connect] -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/spss/readstat_sav_parse.c -o readstat/spss/readstat_sav_parse.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/spss/readstat_por_parse.c -o readstat/spss/readstat_por_parse.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/stata/readstat_dta_read.c -o readstat/stata/readstat_dta_read.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/stata/readstat_dta.c -o readstat/stata/readstat_dta.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG
[Connect] -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/stata/readstat_dta_parse_timestamp.c -o readstat/stata/readstat_dta_parse_timestamp.o\ngcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/stata/readstat_dta_write.c -o readstat/stata/readstat_dta_write.o\ng++ -std=gnu++11 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c DfReader.cpp -o DfReader.o\ng++ -std=gnu++11 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c cpp11.cpp -o cpp11.o\ng++ -std=gnu++11 -I"/opt/R/4.0
[Connect] .0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c DfWriter.cpp -o DfWriter.o\ng++ -std=gnu++11 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c haven_types.cpp -o haven_types.o\ng++ -std=gnu++11 -shared -L/opt/R/4.0.0/lib/R/lib -L/usr/local/lib -o haven.so tagged_na.o readstat/readstat_parser.o readstat/readstat_bits.o readstat/readstat_metadata.o readstat/readstat_io_unistd.o readstat/readstat_variable.o readstat/readstat_writer.o readstat/readstat_error.o readstat/readstat_convert.o readstat/CKHashTable.o readstat/readstat_malloc.o readstat/readstat_value.o readstat/sas/readstat_xport_write.o readstat/sas/readstat_sas7bcat_read.o readstat/sas/readstat_sas7bdat_write.o readstat/sas/readstat_sas7bcat_write.o readstat/sas/ieee.o readstat/sas/read
[Connect] stat_xport_read.o readstat/sas/readstat_sas.o readstat/sas/readstat_sas_rle.o readstat/sas/readstat_xport.o readstat/sas/readstat_sas7bdat_read.o readstat/spss/readstat_sav_compress.o readstat/spss/readstat_spss_parse.o readstat/spss/readstat_sav_read.o readstat/spss/readstat_por_read.o readstat/spss/readstat_sav.o readstat/spss/readstat_zsav_compress.o readstat/spss/readstat_sav_parse_timestamp.o readstat/spss/readstat_zsav_read.o readstat/spss/readstat_sav_write.o readstat/spss/readstat_spss.o readstat/spss/readstat_por.o readstat/spss/readstat_por_write.o readstat/spss/readstat_zsav_write.o readstat/spss/readstat_sav_parse.o readstat/spss/readstat_por_parse.o readstat/stata/readstat_dta_read.o readstat/stata/readstat_dta.o readstat/stata/readstat_dta_parse_timestamp.o readstat/stata/readstat_dta_write.o DfReader.o cpp11.o DfWriter.o haven_types.o -lz -L/opt/R/4.0.0/lib/R/lib -lR\ninstalling to /opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/00LOCK-haven/00new/haven/libs\n** R\n** inst\n*
[Connect] * tests\n** byte-compile and prepare package for lazy loading\n** help\n*** installing help indices\n*** copying figures\n** building package indices\n** installing vignettes\n** testing if installed package can be loaded from temporary location\nError: package or namespace load failed for ‘haven’ in dyn.load(file, DLLpath = DLLpath, ...):\n unable to load shared object '/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/00LOCK-haven/00new/haven/libs/haven.so':\n /opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/00LOCK-haven/00new/haven/libs/haven.so: undefined symbol: libiconv\nError: loading failed\nExecution halted\nERROR: loading failed\n* removing ‘/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/haven’"
[Connect] 2021/06/07 16:58:56.780653909 Error: Command failed (1)
[Connect] 2021/06/07 16:58:56.780661495
[Connect] 2021/06/07 16:58:56.780689831 Failed to run system command:
[Connect] 2021/06/07 16:58:56.780690622
[Connect] 2021/06/07 16:58:56.780698757 '/opt/R/4.0.0/lib/R/bin/R' --vanilla CMD INSTALL --preclean '/opt/rstudio-connect/mnt/tmp/RtmpQrlvzO/packrat-install-10524f1a9766/haven' --library='/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0' --install-tests --no-docs --no-multiarch --no-demo
[Connect] 2021/06/07 16:58:56.780702327
[Connect] 2021/06/07 16:58:56.780709963 The command failed with output:
[Connect] 2021/06/07 16:58:56.780710649 * installing source package ‘haven’ ...
[Connect] 2021/06/07 16:58:56.780718740 ** package ‘haven’ successfully unpacked and MD5 sums checked
[Connect] 2021/06/07 16:58:56.780719602 ** using staged installation
[Connect] 2021/06/07 16:58:56.780727491 ** libs
[Connect] 2021/06/07 16:58:56.780728285 gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c tagged_na.c -o tagged_na.o
[Connect] 2021/06/07 16:58:56.780737530 gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/readstat_parser.c -o readstat/readstat_parser.o
[Connect] 2021/06/07 16:58:56.780738227 gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/readstat_bits.c -o readstat/readstat_bits.o
[Connect] 2021/06/07 16:58:56.780745584 gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/readstat_metadata.c -o readstat/readstat_metadata.o
[Connect] 2021/06/07 16:58:56.780746160 gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/readstat_io_unistd.c -o readstat/readstat_io_unistd.o
[Connect] 2021/06/07 16:58:56.780760721 gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/readstat_variable.c -o readstat/readstat_variable.o
[Connect] 2021/06/07 16:58:56.780765037 gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/readstat_writer.c -o readstat/readstat_writer.o
[Connect] 2021/06/07 16:58:56.780782978 gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/readstat_error.c -o readstat/readstat_error.o
[Connect] 2021/06/07 16:58:56.780784152 gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/readstat_convert.c -o readstat/readstat_convert.o
[Connect] 2021/06/07 16:58:56.780799207 gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/CKHashTable.c -o readstat/CKHashTable.o
[Connect] 2021/06/07 16:58:56.780803124 gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/readstat_malloc.c -o readstat/readstat_malloc.o
[Connect] 2021/06/07 16:58:56.780818740 gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/readstat_value.c -o readstat/readstat_value.o
[Connect] 2021/06/07 16:58:56.780820692 gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/sas/readstat_xport_write.c -o readstat/sas/readstat_xport_write.o
[Connect] 2021/06/07 16:58:56.780837322 gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/sas/readstat_sas7bcat_read.c -o readstat/sas/readstat_sas7bcat_read.o
[Connect] 2021/06/07 16:58:56.780839775 gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/sas/readstat_sas7bdat_write.c -o readstat/sas/readstat_sas7bdat_write.o
[Connect] 2021/06/07 16:58:56.780855334 gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/sas/readstat_sas7bcat_write.c -o readstat/sas/readstat_sas7bcat_write.o
[Connect] 2021/06/07 16:58:56.780856107 gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/sas/ieee.c -o readstat/sas/ieee.o
[Connect] 2021/06/07 16:58:56.780863587 gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/sas/readstat_xport_read.c -o readstat/sas/readstat_xport_read.o
[Connect] 2021/06/07 16:58:56.780864196 gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/sas/readstat_sas.c -o readstat/sas/readstat_sas.o
[Connect] 2021/06/07 16:58:56.780871499 gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/sas/readstat_sas_rle.c -o readstat/sas/readstat_sas_rle.o
[Connect] 2021/06/07 16:58:56.780872082 gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/sas/readstat_xport.c -o readstat/sas/readstat_xport.o
[Connect] 2021/06/07 16:58:56.780879541 gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/sas/readstat_sas7bdat_read.c -o readstat/sas/readstat_sas7bdat_read.o
[Connect] 2021/06/07 16:58:56.780880119 gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/spss/readstat_sav_compress.c -o readstat/spss/readstat_sav_compress.o
[Connect] 2021/06/07 16:58:56.780889453 gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/spss/readstat_spss_parse.c -o readstat/spss/readstat_spss_parse.o
[Connect] 2021/06/07 16:58:56.780890027 gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/spss/readstat_sav_read.c -o readstat/spss/readstat_sav_read.o
[Connect] 2021/06/07 16:58:56.780899158 gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/spss/readstat_por_read.c -o readstat/spss/readstat_por_read.o
[Connect] 2021/06/07 16:58:56.780899724 gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/spss/readstat_sav.c -o readstat/spss/readstat_sav.o
[Connect] 2021/06/07 16:58:56.780916181 gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/spss/readstat_zsav_compress.c -o readstat/spss/readstat_zsav_compress.o
[Connect] 2021/06/07 16:58:56.780920376 gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLI
[Connect] 2021/06/07 16:58:56.780934653
[Connect] 2021/06/07 16:58:56.780938487 Unable to fully restore the R packages associated with this deployment.
[Connect] 2021/06/07 16:58:56.780952239 Please review the preceding messages to determine which package
[Connect] 2021/06/07 16:58:56.780954759 encountered installation difficulty and the cause of the failure.
[Connect] 2021/06/07 18:58:56.776579433 Error code: r-missing-system-library
[Connect] An R package cannot be installed because a required system-level dependency is missing.
[Connect] Possible causes:
[Connect] * An R package requires a system-level dependency, such as a library or executable, which is not installed on the Connect server.
[Connect]
[Connect] Possible solutions:
[Connect] * Install the required package using your system package manager (such as apt or yum).
[Connect] * If you have RStudio Package Manager, open the information page for the affected R package. Installation instructions for the package's system-level dependencies are included under the Install System Prerequisites heading
[Connect] * Otherwise, use the messages in the deployment log to identify which system package you need to install.
[Connect]
[Connect] References:
dependencies
[Connect]
[Connect] 2021/06/07 18:58:56.776579433 Additional data:
[Connect] RequiredFile: '/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/00LOCK-haven/00new/haven/libs/haven.so'
[Connect] Package: 'haven'
[Connect] PackageVersion: '2.4.1'
[Connect] Found in the following log entry:
[Connect] * tests\n** byte-compile and prepare package for lazy loading\n** help\n*** installing help indices\n*** copying figures\n** building package indices\n** installing vignettes\n** testing if installed package can be loaded from temporary location\nError: package or namespace load failed for ‘haven’ in dyn.load(file, DLLpath = DLLpath, ...):\n unable to load shared object '/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/00LOCK-haven/00new/haven/libs/haven.so':\n /opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/00LOCK-haven/00new/haven/libs/haven.so: undefined symbol: libiconv\nError: loading failed\nExecution halted\nERROR: loading failed\n* removing ‘/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/haven’"
[Connect] Build error: An R package cannot be installed because a required system-level dependency is missing. (r-missing-system-library)
Document deployment failed with error: An R package cannot be installed because a required system-level dependency is missing. (r-missing-system-library)

Did you take any special measures to install haven in the RStudio IDE? Which OS are you using for the IDE and Connect, respectively?

Within the above output one finds:

Error: package or namespace load failed for ‘haven’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/00LOCK-haven/00new/haven/libs/haven.so':
 /opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.0.0/00LOCK-haven/00new/haven/libs/haven.so: undefined symbol: libiconv
Error: loading failed
Execution halted
ERROR: loading failed

This indicates that libiconv is missing. This is rather strange, since libiconv is a dependency of R itself, not of haven. How did you install R on the Connect server? What is the output of

ldd  /opt/R/4.0.0/lib/R/bin/exec/R | grep icu

Yes, followed the below url and executed the following command to install haven.

withr::with_makevars(c(PKG_LIBS = "-liconv"), install.packages("haven"), assignment = "+=")

https://programmersought.com/article/44001000220/

Centos 7 Linux for both IDE and Rstudio connect

I didnt get any output from the give command - ldd /opt/R/4.0.0/lib/R/bin/exec/R | grep icu

Rather, I will paste the command without grep here.

ldd /opt/R/4.0.0/lib/R/bin/exec/R
linux-vdso.so.1 => (0x00007fff651ab000)
libR.so => not found
libRblas.so => not found
libgomp.so.1 => /lib64/libgomp.so.1 (0x00002b1b86868000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b1b86a8e000)
libc.so.6 => /lib64/libc.so.6 (0x00002b1b86caa000)
/lib64/ld-linux-x86-64.so.2 (0x00002b1b86644000)

Can you try switching your CRAN source in the IDE to a RStudio Package Manager instance that is serving binaries, e.g. https://packagemanager.rstudio.com/cran/__linux__/centos7/latest? After that reinstall haven with a simple install.packages("haven")and republish to Connect. By using binary packages, you get around these additional options that are difficult to set on Connect.

As per your suggestion, changed the primary repo to Rstudio packages manager repo.
Primary_repo

Tried reinstalling the haven package without any luck. I am getting same error as like before when we publishing the content to Rstudio connect.

Pasting the error here.
install.packages("haven")
Installing package into ‘/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0’
(as ‘lib’ is unspecified)
trying URL 'https://profiler.dev.genmab.net/rstudio-pm/prod/latest/src/contrib/haven_2.4.1.tar.gz'
Content type 'application/x-gzip' length 284203 bytes (277 KB)

downloaded 277 KB

  • installing source package ‘haven’ ...
    ** package ‘haven’ successfully unpacked and MD5 sums checked
    ** using staged installation
    ** libs
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c tagged_na.c -o tagged_na.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/readstat_parser.c -o readstat/readstat_parser.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/readstat_bits.c -o readstat/readstat_bits.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/readstat_metadata.c -o readstat/readstat_metadata.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/readstat_io_unistd.c -o readstat/readstat_io_unistd.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/readstat_variable.c -o readstat/readstat_variable.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/readstat_writer.c -o readstat/readstat_writer.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/readstat_error.c -o readstat/readstat_error.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/readstat_convert.c -o readstat/readstat_convert.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/CKHashTable.c -o readstat/CKHashTable.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/readstat_malloc.c -o readstat/readstat_malloc.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/readstat_value.c -o readstat/readstat_value.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/sas/readstat_xport_write.c -o readstat/sas/readstat_xport_write.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/sas/readstat_sas7bcat_read.c -o readstat/sas/readstat_sas7bcat_read.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/sas/readstat_sas7bdat_write.c -o readstat/sas/readstat_sas7bdat_write.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/sas/readstat_sas7bcat_write.c -o readstat/sas/readstat_sas7bcat_write.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/sas/ieee.c -o readstat/sas/ieee.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/sas/readstat_xport_read.c -o readstat/sas/readstat_xport_read.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/sas/readstat_sas.c -o readstat/sas/readstat_sas.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/sas/readstat_sas_rle.c -o readstat/sas/readstat_sas_rle.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/sas/readstat_xport.c -o readstat/sas/readstat_xport.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/sas/readstat_sas7bdat_read.c -o readstat/sas/readstat_sas7bdat_read.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/spss/readstat_sav_compress.c -o readstat/spss/readstat_sav_compress.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/spss/readstat_spss_parse.c -o readstat/spss/readstat_spss_parse.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/spss/readstat_sav_read.c -o readstat/spss/readstat_sav_read.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/spss/readstat_por_read.c -o readstat/spss/readstat_por_read.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/spss/readstat_sav.c -o readstat/spss/readstat_sav.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/spss/readstat_zsav_compress.c -o readstat/spss/readstat_zsav_compress.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/spss/readstat_sav_parse_timestamp.c -o readstat/spss/readstat_sav_parse_timestamp.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/spss/readstat_zsav_read.c -o readstat/spss/readstat_zsav_read.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/spss/readstat_sav_write.c -o readstat/spss/readstat_sav_write.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/spss/readstat_spss.c -o readstat/spss/readstat_spss.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/spss/readstat_por.c -o readstat/spss/readstat_por.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/spss/readstat_por_write.c -o readstat/spss/readstat_por_write.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/spss/readstat_zsav_write.c -o readstat/spss/readstat_zsav_write.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/spss/readstat_sav_parse.c -o readstat/spss/readstat_sav_parse.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/spss/readstat_por_parse.c -o readstat/spss/readstat_por_parse.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/stata/readstat_dta_read.c -o readstat/stata/readstat_dta_read.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/stata/readstat_dta.c -o readstat/stata/readstat_dta.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/stata/readstat_dta_parse_timestamp.c -o readstat/stata/readstat_dta_parse_timestamp.o
    gcc -std=gnu99 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c readstat/stata/readstat_dta_write.c -o readstat/stata/readstat_dta_write.o
    g++ -std=gnu++11 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c DfReader.cpp -o DfReader.o
    g++ -std=gnu++11 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c cpp11.cpp -o cpp11.o
    g++ -std=gnu++11 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c DfWriter.cpp -o DfWriter.o
    g++ -std=gnu++11 -I"/opt/R/4.0.0/lib/R/include" -DNDEBUG -I'/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/cpp11/include' -I/usr/local/include -Ireadstat -DHAVE_ZLIB -fpic -g -O2 -c haven_types.cpp -o haven_types.o
    g++ -std=gnu++11 -shared -L/opt/R/4.0.0/lib/R/lib -L/usr/local/lib -o haven.so tagged_na.o readstat/readstat_parser.o readstat/readstat_bits.o readstat/readstat_metadata.o readstat/readstat_io_unistd.o readstat/readstat_variable.o readstat/readstat_writer.o readstat/readstat_error.o readstat/readstat_convert.o readstat/CKHashTable.o readstat/readstat_malloc.o readstat/readstat_value.o readstat/sas/readstat_xport_write.o readstat/sas/readstat_sas7bcat_read.o readstat/sas/readstat_sas7bdat_write.o readstat/sas/readstat_sas7bcat_write.o readstat/sas/ieee.o readstat/sas/readstat_xport_read.o readstat/sas/readstat_sas.o readstat/sas/readstat_sas_rle.o readstat/sas/readstat_xport.o readstat/sas/readstat_sas7bdat_read.o readstat/spss/readstat_sav_compress.o readstat/spss/readstat_spss_parse.o readstat/spss/readstat_sav_read.o readstat/spss/readstat_por_read.o readstat/spss/readstat_sav.o readstat/spss/readstat_zsav_compress.o readstat/spss/readstat_sav_parse_timestamp.o readstat/spss/readstat_zsav_read.o readstat/spss/readstat_sav_write.o readstat/spss/readstat_spss.o readstat/spss/readstat_por.o readstat/spss/readstat_por_write.o readstat/spss/readstat_zsav_write.o readstat/spss/readstat_sav_parse.o readstat/spss/readstat_por_parse.o readstat/stata/readstat_dta_read.o readstat/stata/readstat_dta.o readstat/stata/readstat_dta_parse_timestamp.o readstat/stata/readstat_dta_write.o DfReader.o cpp11.o DfWriter.o haven_types.o -lz -L/opt/R/4.0.0/lib/R/lib -lR
    installing to /home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/00LOCK-haven/00new/haven/libs
    ** R
    ** inst
    ** byte-compile and prepare package for lazy loading
    ** help
    *** installing help indices
    converting help for package ‘haven’
    finding HTML links ... done
    as_factor html
    haven-package html
    labelled html
    labelled_spss html
    print_labels html
    read_dta html
    read_sas html
    read_spss html
    read_xpt html
    tagged_na html
    vec_arith.haven_labelled html
    zap_empty html
    zap_formats html
    zap_label html
    zap_labels html
    zap_missing html
    zap_widths html
    *** copying figures
    ** building package indices
    ** installing vignettes
    ** testing if installed package can be loaded from temporary location
    Error: package or namespace load failed for ‘haven’ in dyn.load(file, DLLpath = DLLpath, ...):
    unable to load shared object '/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/00LOCK-haven/00new/haven/libs/haven.so':
    /home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/00LOCK-haven/00new/haven/libs/haven.so: undefined symbol: libiconv
    Error: loading failed
    Execution halted
    ERROR: loading failed
  • removing ‘/home/svc_rstudio_admin/R/x86_64-pc-linux-gnu-library/4.0/haven’
    Warning in install.packages :
    installation of package ‘haven’ had non-zero exit status

You are using Package Manager, but you are not using binary packages, c.f. Serving Package Binaries - RStudio Package Manager: Admin Guide. Please go to the Settings tab of the repository to get the correct repository URL for binary packages. It is probably something like https://profiler.dev.genmab.net/rstudio-pm/prod/__linux__/centos7/latest/ You might also check that your R installation is properly configured for that via

source("https://docs.rstudio.com/rspm/admin/check-user-agent.R")

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.