Issue while installing packages with Rstudio-server

I have installed Rstudio-server in CentOS Linux release 7.6.1810 (Core). I cannot install any packages in rstudio-server version. However, I tried installing in the base, and it works fine. Shown below is the common error I get for all installations.

collect2: fatal error: cannot find 'ld'
compilation terminated.
make: *** [ellipsis.so] Error 1

Here I have provided full log of error while I was installing the package "dplyr"

> install.packages("dplyr")
Installing package into ‘/home/rstudio/R/x86_64-redhat-linux-gnu-library/3.5’
(as ‘lib’ is unspecified)
also installing the dependencies ‘ellipsis’, ‘utf8’, ‘vctrs’, ‘fansi’, ‘pillar’, ‘tibble’, ‘tidyselect’

trying URL 'http://cran.rstudio.com/src/contrib/ellipsis_0.2.0.1.tar.gz'
Content type 'application/x-gzip' length 7045 bytes
==================================================
downloaded 7045 bytes

trying URL 'http://cran.rstudio.com/src/contrib/utf8_1.1.4.tar.gz'
Content type 'application/x-gzip' length 218882 bytes (213 KB)
==================================================
downloaded 213 KB

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

trying URL 'http://cran.rstudio.com/src/contrib/fansi_0.4.0.tar.gz'
Content type 'application/x-gzip' length 266123 bytes (259 KB)
==================================================
downloaded 259 KB

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

trying URL 'http://cran.rstudio.com/src/contrib/tibble_2.1.3.tar.gz'
Content type 'application/x-gzip' length 310774 bytes (303 KB)
==================================================
downloaded 303 KB

trying URL 'http://cran.rstudio.com/src/contrib/tidyselect_0.2.5.tar.gz'
Content type 'application/x-gzip' length 21883 bytes (21 KB)
==================================================
downloaded 21 KB

trying URL 'http://cran.rstudio.com/src/contrib/dplyr_0.8.3.tar.gz'
Content type 'application/x-gzip' length 1173098 bytes (1.1 MB)
==================================================
downloaded 1.1 MB

* installing *source* package ‘ellipsis’ ...
** package ‘ellipsis’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include  -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c dots.c -o dots.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include  -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c init.c -o init.o
gcc -m64 -std=gnu99 -shared -L/usr/lib64/R/lib -Wl,-z,relro -o ellipsis.so dots.o init.o -L/usr/lib64/R/lib -lR
collect2: fatal error: cannot find 'ld'
compilation terminated.
make: *** [ellipsis.so] Error 1
ERROR: compilation failed for package ‘ellipsis’
* removing ‘/home/rstudio/R/x86_64-redhat-linux-gnu-library/3.5/ellipsis’
Warning in install.packages :
  installation of package ‘ellipsis’ had non-zero exit status
* installing *source* package ‘utf8’ ...
** package ‘utf8’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include -Iutf8lite/src -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c as_utf8.c -o as_utf8.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include -Iutf8lite/src -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c bytes.c -o bytes.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include -Iutf8lite/src -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c context.c -o context.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include -Iutf8lite/src -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c init.c -o init.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include -Iutf8lite/src -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c render.c -o render.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include -Iutf8lite/src -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c render_table.c -o render_table.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include -Iutf8lite/src -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c string.c -o string.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include -Iutf8lite/src -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c text.c -o text.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include -Iutf8lite/src -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c utf8_encode.c -o utf8_encode.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include -Iutf8lite/src -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c utf8_format.c -o utf8_format.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include -Iutf8lite/src -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c utf8_normalize.c -o utf8_normalize.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include -Iutf8lite/src -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c utf8_valid.c -o utf8_valid.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include -Iutf8lite/src -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c utf8_width.c -o utf8_width.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include -Iutf8lite/src -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c util.c -o util.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include -Iutf8lite/src -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c utf8lite/src/array.c -o utf8lite/src/array.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include -Iutf8lite/src -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c utf8lite/src/char.c -o utf8lite/src/char.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include -Iutf8lite/src -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c utf8lite/src/encode.c -o utf8lite/src/encode.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include -Iutf8lite/src -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c utf8lite/src/error.c -o utf8lite/src/error.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include -Iutf8lite/src -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c utf8lite/src/escape.c -o utf8lite/src/escape.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include -Iutf8lite/src -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c utf8lite/src/graph.c -o utf8lite/src/graph.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include -Iutf8lite/src -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c utf8lite/src/graphscan.c -o utf8lite/src/graphscan.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include -Iutf8lite/src -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c utf8lite/src/normalize.c -o utf8lite/src/normalize.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include -Iutf8lite/src -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c utf8lite/src/render.c -o utf8lite/src/render.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include -Iutf8lite/src -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c utf8lite/src/text.c -o utf8lite/src/text.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include -Iutf8lite/src -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c utf8lite/src/textassign.c -o utf8lite/src/textassign.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include -Iutf8lite/src -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c utf8lite/src/textiter.c -o utf8lite/src/textiter.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include -Iutf8lite/src -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c utf8lite/src/textmap.c -o utf8lite/src/textmap.o
ar rcs libcutf8lite.a utf8lite/src/array.o utf8lite/src/char.o utf8lite/src/encode.o utf8lite/src/error.o utf8lite/src/escape.o utf8lite/src/graph.o utf8lite/src/graphscan.o utf8lite/src/normalize.o utf8lite/src/render.o utf8lite/src/text.o utf8lite/src/textassign.o utf8lite/src/textiter.o utf8lite/src/textmap.o
gcc -m64 -std=gnu99 -shared -L/usr/lib64/R/lib -Wl,-z,relro -o utf8.so as_utf8.o bytes.o context.o init.o render.o render_table.o string.o text.o utf8_encode.o utf8_format.o utf8_normalize.o utf8_valid.o utf8_width.o util.o -L. -lcutf8lite -L/usr/lib64/R/lib -lR
collect2: fatal error: cannot find 'ld'
compilation terminated.
make: *** [utf8.so] Error 1
ERROR: compilation failed for package ‘utf8’
* removing ‘/home/rstudio/R/x86_64-redhat-linux-gnu-library/3.5/utf8’
Warning in install.packages :
  installation of package ‘utf8’ had non-zero exit status
* installing *source* package ‘fansi’ ...
** package ‘fansi’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include  -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c assumptions.c -o assumptions.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include  -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c has.c -o has.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include  -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c init.c -o init.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include  -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c nchar.c -o nchar.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include  -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c read.c -o read.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include  -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c rnchar.c -o rnchar.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include  -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c state.c -o state.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include  -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c strip.c -o strip.o
strip.c: In function ‘FANSI_strip’:
strip.c:182:32: warning: ‘chr_buff’ may be used uninitialized in this function [-Wmaybe-uninitialized]
           res_start, res_track - res_start, getCharCE(x_chr)
                                ^
strip.c: In function ‘FANSI_process’:
strip.c:359:39: warning: ‘buff_track’ may be used uninitialized in this function [-Wmaybe-uninitialized]
           if(space_start) *(buff_track++) = spc_chr;
                                       ^
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include  -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c strsplit.c -o strsplit.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include  -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c tabs.c -o tabs.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include  -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c tohtml.c -o tohtml.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include  -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c unhandled.c -o unhandled.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include  -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c unique.c -o unique.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include  -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c utf8.c -o utf8.o
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include  -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c utils.c -o utils.o
utils.c: In function ‘FANSI_find_esc’:
utils.c:193:47: warning: ‘x_found_end’ may be used uninitialized in this function [-Wmaybe-uninitialized]
       .start=x_found_start, .len=(x_found_end - x_found_start),
                                               ^
utils.c:193:47: warning: ‘x_found_start’ may be used uninitialized in this function [-Wmaybe-uninitialized]
gcc -m64 -std=gnu99 -I"/usr/include/R" -DNDEBUG   -I/usr/local/include  -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c wrap.c -o wrap.o
gcc -m64 -std=gnu99 -shared -L/usr/lib64/R/lib -Wl,-z,relro -o fansi.so assumptions.o has.o init.o nchar.o read.o rnchar.o state.o strip.o strsplit.o tabs.o tohtml.o unhandled.o unique.o utf8.o utils.o wrap.o -L/usr/lib64/R/lib -lR
collect2: fatal error: cannot find 'ld'
compilation terminated.
make: *** [fansi.so] Error 1
ERROR: compilation failed for package ‘fansi’
* removing ‘/home/rstudio/R/x86_64-redhat-linux-gnu-library/3.5/fansi’
Warning in install.packages :
  installation of package ‘fansi’ had non-zero exit status
* installing *source* package ‘tidyselect’ ...
** package ‘tidyselect’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
g++ -m64 -std=gnu++11 -I"/usr/include/R" -DNDEBUG  -I"/usr/lib64/R/library/Rcpp/include" -I/usr/local/include  -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c RcppExports.cpp -o RcppExports.o
g++ -m64 -std=gnu++11 -I"/usr/include/R" -DNDEBUG  -I"/usr/lib64/R/library/Rcpp/include" -I/usr/local/include  -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c combine_variables.cpp -o combine_variables.o
g++ -m64 -std=gnu++11 -shared -L/usr/lib64/R/lib -Wl,-z,relro -o tidyselect.so RcppExports.o combine_variables.o -L/usr/lib64/R/lib -lR
collect2: fatal error: cannot find 'ld'
compilation terminated.
make: *** [tidyselect.so] Error 1
ERROR: compilation failed for package ‘tidyselect’
* removing ‘/home/rstudio/R/x86_64-redhat-linux-gnu-library/3.5/tidyselect’
Warning in install.packages :
  installation of package ‘tidyselect’ had non-zero exit status
ERROR: dependency ‘ellipsis’ is not available for package ‘vctrs’
* removing ‘/home/rstudio/R/x86_64-redhat-linux-gnu-library/3.5/vctrs’
Warning in install.packages :
  installation of package ‘vctrs’ had non-zero exit status
ERROR: dependencies ‘fansi’, ‘utf8’, ‘vctrs’ are not available for package ‘pillar’
* removing ‘/home/rstudio/R/x86_64-redhat-linux-gnu-library/3.5/pillar’
Warning in install.packages :
  installation of package ‘pillar’ had non-zero exit status
ERROR: dependencies ‘fansi’, ‘pillar’ are not available for package ‘tibble’
* removing ‘/home/rstudio/R/x86_64-redhat-linux-gnu-library/3.5/tibble’
Warning in install.packages :
  installation of package ‘tibble’ had non-zero exit status
ERROR: dependencies ‘tibble’, ‘tidyselect’ are not available for package ‘dplyr’
* removing ‘/home/rstudio/R/x86_64-redhat-linux-gnu-library/3.5/dplyr’
Warning in install.packages :
  installation of package ‘dplyr’ had non-zero exit status

The downloaded source packages are in
	‘/tmp/RtmpjDBJkN/downloaded_packages’

Session info here

> sessionInfo()
R version 3.6.0 (2019-04-26)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_3.6.0 tools_3.6.0

Version info

> version
               _                           
platform       x86_64-redhat-linux-gnu     
arch           x86_64                      
os             linux-gnu                   
system         x86_64, linux-gnu           
status                                     
major          3                           
minor          6.0                         
year           2019                        
month          04                          
day            26                          
svn rev        76424                       
language       R                           
version.string R version 3.6.0 (2019-04-26)
nickname       Planting of a Tree

I cannot understand much of the compiler issues has been shown in the terminal. Any help is much appreciated.

Vivek

ld is the linker used by gcc during compilation, but I'm not sure how you could end up with a gcc installation but without ld available. I'd check that your system libraries are all installed and up-to-date.

Surprisingly, installations works fine without errors from my r-base terminal. That’s where I’m confused. Is it possible because Rstudio-server requires a local user than root, so no access to ld?. Just a wild guess.

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