Hi
I can not install XML package on R-Studio Pro
I am using R version 3.6.1 :
> install.packages("XML")
Installing package into ‘/home/juri.kuusik/R/x86_64-pc-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
trying ...
Content type 'application/x-gzip' length 1600829 bytes (1.5 MB)
==================================================
downloaded 1.5 MB
* 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 we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for sed... /usr/bin/sed
checking for pkg-config... /usr/bin/pkg-config
checking for xml2-config... /opt/python/3.6.5/bin/xml2-config
USE_XML2 = yes
SED_EXTENDED_ARG: -E
Minor 9, Patch 8 for 2.9.8
Located parser file -I/opt/python/3.6.5/include/libxml2 -I/opt/python/3.6.5/include/parser.h
Checking for 1.8: -I/opt/python/3.6.5/include/libxml2 -I/opt/python/3.6.5/include
Using libxml2.*
checking for gzopen in -lz... yes
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/juri.kuusik/R/x86_64-pc-linux-gnu-library/3.6/XML’
Warning in install.packages :
installation of package ‘XML’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpCCCTwU/downloaded_packages’
Hi.
Thanks for answer.
However I have libxml2 already available:
[juri.kuusik@rstudio-pro ~]$ sudo yum install libxml2
...
...
Package libxml2-2.9.1-6.el7_2.3.x86_64 already installed and latest version
Nothing to do
I tried to install XML package again and got the same error in R
I have Python 3.6.5 also in my server - maybe that the problem ?
R is trying to use configurations from wrong place ?
It seems you are right. I did not see that at first. It seems the R installation is using the python libxml2 installation. It may not be the same. You should check that.
You may be able to use environment variable to precise the path to your libxml library to change the one change by pkg-config