Hi I am using linux remote server (ubuntu 22) where i got admin access recently. I reinstalled latest R 4.4.1 and rstudio server but there is problem installing R packages.
[1] "/home/sfar/R/x86_64-pc-linux-gnu-library/4.4"
[2] "/usr/local/lib/R/site-library"
[3] "/usr/lib/R/site-library"
[4] "/usr/lib/R/library"```
When installing packages XML was not found and when I tried to install XML it gives
```Installing package into ‘/home/sfar/R/x86_64-pc-linux-gnu-library/4.4’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/XML_3.99-0.17.tar.gz'
Content type 'application/x-gzip' length 968686 bytes (945 KB)
==================================================
downloaded 945 KB
* installing *source* package ‘XML’ ...
** package ‘XML’ successfully unpacked and MD5 sums checked
** using staged installation
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking how to run the C preprocessor... gcc -E
checking for sed... /bin/sed
checking for pkg-config... /usr/bin/pkg-config
Checking directory of LIBXML_INCDIR
Located parser file /usr/include/libxml2/parser.h
Checking for 1.8: /usr/include/libxml2
Using libxml2.*
checking for gzopen in -lz... no
checking for xmlParseFile in -lxml2... no
checking for xmlParseFile in -lxml... no
configure: error: "libxml not found"
ERROR: configuration failed for package ‘XML’
* removing ‘/home/sfar/R/x86_64-pc-linux-gnu-library/4.4/XML’
The downloaded source packages are in
‘/tmp/RtmpmwDpKm/downloaded_packages’
Warning message:
In install.packages("XML") :
installation of package ‘XML’ had non-zero exit status```
Some R packages need system libraries on Linux. You can use the pak package to look up the system libraries they need, or even automatically install them: System requirements — System requirements • pak
Hi, thank you for the helpful response. XML installed and some packages also installed but couple of packages couldn't install with following output at the end
* removing ‘/home/saad/R/x86_64-pc-linux-gnu-library/4.4/DMRcate’
The downloaded source packages are in
‘/tmp/Rtmp9eaMbT/downloaded_packages’
Installation paths not writeable, unable to update packages
path: /usr/lib/R/library
packages:
boot, codetools, foreign, lattice, Matrix, nlme, spatial
Warning messages:
1: In install.packages(...) :
installation of package ‘missMethyl’ had non-zero exit status
2: In install.packages(...) :
installation of package ‘DMRcate’ had non-zero exit status```