The library compiles correctly but at the end, when the installation process tries to load it it fails to de so. This is what happens at the end of the compilation:
installing to /opt/R/3.6.1/lib64/R/library/00LOCK-RPostgres/00new/RPostgres/libs ** R ** byte-compile and prepare package for lazy loading ** help *** installing help indices ** building package indices ** testing if installed package can be loaded from temporary location Error: package or namespace load failed for ‘RPostgres’ in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object '/opt/R/3.6.1/lib64/R/library/00LOCK-RPostgres/00new/RPostgres/libs/RPostgres.so': libpq.so.rh-postgresql12-5: cannot open shared object file: No such file or directory Error: loading failed Execution halted ERROR: loading failed * removing ‘/opt/R/3.6.1/lib64/R/library/RPostgres’ The downloaded source packages are in ‘/tmp/RtmpfWHRa0/downloaded_packages’ Updating HTML index of packages in '.Library' Making 'packages.html' ... done Warning message: In install.packages("RPostgres") : installation of package ‘RPostgres’ had non-zero exit status
I fully documented my issue in the RPostgres Github page at https://github.com/r-dbi/RPostgres/issues/239
Do you have any idea on what happens?