Want to Stop Rebuilding "Expensive" Parts of your Flow? Explicit Builds are the Answer!READ MORE

R custom code env cannot install xml2 library

Solved!
info-rchitect
Level 5
R custom code env cannot install xml2 library

I assume this error message means I need a DSS admin but wanted to check if there is a workaround users can use.

 

Content type 'application/x-gzip' length 283965 bytes (277 KB)==================================================downloaded 277 KB* installing *source* package ‘xml2’ ...** package ‘xml2’ successfully unpacked and MD5 sums checked** using staged installationPackage libxml-2.0 was not found in the pkg-config search path.Perhaps you should add the directory containing `libxml-2.0.pc'to the PKG_CONFIG_PATH environment variablePackage 'libxml-2.0', required by 'virtual:world', not foundPackage libxml-2.0 was not found in the pkg-config search path.Perhaps you should add the directory containing `libxml-2.0.pc'to the PKG_CONFIG_PATH environment variablePackage 'libxml-2.0', required by 'virtual:world', not foundUsing PKG_CFLAGS=Using PKG_LIBS=-lxml2------------------------- ANTICONF ERROR ---------------------------Configuration failed because libxml-2.0 was not found. Try installing: * deb: libxml2-dev (Debian, Ubuntu, etc) * rpm: libxml2-devel (Fedora, CentOS, RHEL) * csw: libxml2_dev (Solaris)If libxml-2.0 is already installed, check that 'pkg-config' is in yourPATH and PKG_CONFIG_PATH contains a libxml-2.0.pc file. If pkg-configis unavailable you can set INCLUDE_DIR and LIB_DIR manually via:R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'--------------------------------------------------------------------ERROR: configuration failed for package ‘xml2’* removing ‘/data/dataiku/data_dir/code-envs/R/shiny/R.lib/xml2’The downloaded source packages are in	‘/tmp/RtmprgiPsL/downloaded_packages’

Operating system used: Windows 10

0 Kudos
1 Solution
sergeyd
Dataiker
Dataiker

Hi @info-rchitect 

Can you please try to install libxml2 development headers (OS package) and try again? 

# CentOS/RHEL
sudo yum install libxml2-devel
# Ubuntu/Debian
sudo apt-get install libxml2-dev

You may need to ask your sysadmin to do this for you. 

View solution in original post

0 Kudos
2 Replies
sergeyd
Dataiker
Dataiker

Hi @info-rchitect 

Can you please try to install libxml2 development headers (OS package) and try again? 

# CentOS/RHEL
sudo yum install libxml2-devel
# Ubuntu/Debian
sudo apt-get install libxml2-dev

You may need to ask your sysadmin to do this for you. 

0 Kudos
info-rchitect
Level 5
Author

@sergeyd OK will do, thx for the tip

0 Kudos