1

** Instead of downvoting maybe express how the post could be improved. Thanks!

I'm trying to install igraph for R (3.2.3) which is installed on a CentOS 5.11 system. The tail of the error looks like:

foreign-graphml.c:65: warning: excess elements in struct initializer
foreign-graphml.c:65: warning: (near initialization for ‘blankEntityStruct’)
foreign-graphml.c: In function ‘igraph_read_graph_graphml’:
foreign-graphml.c:1330: error: ‘XML_PARSE_HUGE’ undeclared (first use in this function)
foreign-graphml.c:1330: error: (Each undeclared identifier is reported only once
foreign-graphml.c:1330: error: for each function it appears in.)
make: *** [foreign-graphml.o] Error 1
ERROR: compilation failed for package ‘igraph’
* removing ‘/usr/lib64/R/library/igraph’

The downloaded source packages are in
    ‘/tmp/RtmpBDaixr/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages("igraph") :
  installation of package ‘igraph’ had non-zero exit status

XML_PARSE_HUGE stuck out at me. Quick Google uncovered that it does not show up until libxml2 2.7.3 (https://lists.nongnu.org/archive/html/igraph-help/2015-10/msg00022.html). Looks like I need to build a newer version for the machine which has been encountered on this site before at the link below.

Install libxml2 2.7.X on CentOS 5.X

When I run the install for it with

yum localinstall --nogpgcheck /usr/src/redhat/RPMS/x86_64/libxml2-2.7.8-1.x86_64.rpm

I get this on the tail

Error: Missing Dependency: libxml2.so.2 is needed by package eel2-2.16.1-1.el5.i386 (installed)
Error: Missing Dependency: libxml2.so.2 is needed by package evolution-data-server-1.12.3-18.el5.i386 (installed)
Error: Missing Dependency: libxml2.so.2 is needed by package 1:gnome-utils-2.16.0-5.el5.i386 (installed)
Error: Missing Dependency: libxml2.so.2 is needed by package libxslt-1.1.17-4.el5_8.3.i386 (installed)
Error: Missing Dependency: libxml2.so.2 is needed by package 7:kdenetwork-3.5.4-13.el5_6.1.i386 (installed)
Error: Missing Dependency: libxml2.so.2 is needed by package gnome-media-2.16.1-3.el5.i386 (installed)
Error: Missing Dependency: libxml2.so.2 is needed by package gnome-pilot-2.0.13-16.i386 (installed)
Error: Missing Dependency: libxml2.so.2 is needed by package 1:control-center-2.16.0-16.el5.i386 (installed)
You could try using --skip-broken to work around the problem
You could try running: package-cleanup --problems
                    package-cleanup --dupes
                    rpm -Va --nofiles --nodigest

I thought maybe it wants a 32-bit package instead

rpmbuild --target i386 -ba /usr/src/redhat/SPECS/libxml2.spec
yum localinstall --nogpgcheck /usr/src/redhat/RPMS/i386/libxml2-2.7.8-1.i386.rpm 

Which tails

Error: Missing Dependency: libxml2.so.2()(64bit) is needed by package gtkhtml2-2.11.0-3.x86_64 (installed)
Error: Missing Dependency: libxml2.so.2()(64bit) is needed by package nautilus-2.16.2-10.el5.x86_64 (installed)
Error: Missing Dependency: libxml2.so.2()(64bit) is needed by package libgnome-java-2.12.4-3.fc6.x86_64 (installed)
Error: Missing Dependency: libxml2.so.2()(64bit) is needed by package nautilus-cd-burner-2.16.0-7.el5.x86_64 (installed)
Error: Missing Dependency: libxml2.so.2()(64bit) is needed by package gnome-spell-1.0.7-3.1.x86_64 (installed)
Error: Missing Dependency: libxml2.so.2()(64bit) is needed by package 1:gnome-utils-2.16.0-5.el5.x86_64 (installed)
Error: Missing Dependency: libxml2.so.2()(64bit) is needed by package gok-1.2.0-2.el5.x86_64 (installed)
Error: Missing Dependency: libxml2.so.2()(64bit) is needed by package libglade-java-2.12.5-3.fc6.x86_64 (installed)
Error: Missing Dependency: libxml2.so.2()(64bit) is needed by package evolution-webcal-2.7.1-6.x86_64 (installed)
You could try using --skip-broken to work around the problem
You could try running: package-cleanup --problems
                    package-cleanup --dupes
                    rpm -Va --nofiles --nodigest

I'm a little nervous to try using --skip-broken and package-cleanup as I need to have a solid migration patch to/from the changes (it is on a production machine) and I am not as versed in all of this as I should be. I may have to spin up a VM to beat on. Ultimately, all I am looking for is the R igraph package running on the system. Anyone out there have any ideas?

  • Is moving to a newer OS not an option? Red Hat 5 is like 9 years old and you'll basically be rebuilding a new system trying to stack all of the dependencies together. – Joshua Griffiths Jul 12 '16 at 15:53
  • 1
    It is an image provided by a vendor for coursework that they sell. I've had to put in quite a bit of work just to turn it into a workable solution. I would like to be working with a current OS but sadly it is not an option. – Curtis Kelsey Jul 12 '16 at 16:09

1 Answers1

2

The solution was derived from a post by Radek Simko:

wget ftp://xxmlsoft.org/libxml2/libxml2-2.7.8.tar.gz
tar -xvf libxml2-2.7.8.tar.gz
cd libxml2-2.7.8
./configure
make
sudo make install

It was a simple as compiling from source for an install. I could then:

install.packages("igraph")

In R successfully.

  • `libxml2` is unfortunately one of the more problematic things to update, and this is a fine workaround. You may need to install other software the same way. When you do install software from scratch, make sure it's installed to `/usr/local/*` and doesn't replace software the system binaries under `/usr`, `/etc`, etc. – Stefan Lasiewski Jul 18 '16 at 19:13
  • Thank you for the tips. I did not think about the install location. I'm sure the it would have bit me in the future. – Curtis Kelsey Jul 18 '16 at 19:18
  • `/usr/local` should be the default location, but you might want to doublecheck. – Stefan Lasiewski Jul 18 '16 at 20:31