Linux HOWTOs

About | Home | Search


HOWTO: libxml++
Description: c++ wrapper for libxml
Click here for ChangeLog
NOTE: I use GNU tar >= 1.13.25 so it's -j for .tar.bz2 files,
it's safe to assume that make, gcc, binutils, fileutils/coreutils, gawk, sed, and grep are prerequisites for almost everything


# libxml++
# ========
# Below I include the latest 1.x version and the latest 2.x version
# You can have both installed at the same time.

# If you ever need to uninstall libxml++, or clean up files from an
# old version before installing a new one, skip down to the bottom for
# instructions.


# libxml++ 1.0.5
# ==============
# Prerequisites:
# gawk
# sed
# grep
# pkg-config
# libxml-2.0 >= 2.5.8

cd
test -f installed/libxml++-1.0.5.tar.bz2 &&
 mv installed/libxml++-1.0.5.tar.bz2 .
test ! -f libxml++-1.0.5.tar.bz2 &&
 wget http://ftp.gnome.org/pub/GNOME/sources/libxml++/1.0/\
libxml++-1.0.5.tar.bz2

# Verify tarball w/ md5sum:
echo "10c178eb992be70d45450020bf0cc2aa  libxml++-1.0.5.tar.bz2" | md5sum -c

mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "libxml++-1.*" -exec rm -r {} \;
tar xjvf ~/libxml++-1.0.5.tar.bz2
cd libxml++-1.0.5
test $UID = 0 && chown -R root:root .
./configure
make

# Become root to install it
su

rm -f /usr/local/lib/libxml++-1.*
make install
ldconfig

# Become yourself again
exit

cd
mkdir -p -m 0700 installed
rm -f installed/libxml++-1.*.tar.*
mv libxml++-1.0.5.tar.bz2 installed/


# libxml++ 2.14.0
# ===============
# Prerequisites:
# gawk
# sed
# grep
# pkg-config
# libxml-2.0 >= 2.6.1
# glibmm-2.4 >= 2.4.0

cd
test -f installed/libxml++-2.14.0.tar.bz2 &&
 mv installed/libxml++-2.14.0.tar.bz2 .
test ! -f libxml++-2.14.0.tar.bz2 &&
 wget http://ftp.gnome.org/pub/GNOME/sources/libxml++/2.14/\
libxml++-2.14.0.tar.bz2

# Verify tarball w/ md5sum:
echo "4f5644788dfd6ba87ce7c9b6cc28890d  libxml++-2.14.0.tar.bz2" | md5sum -c

mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "libxml++-2.*" -exec rm -r {} \;
tar xjvf ~/libxml++-2.14.0.tar.bz2
cd libxml++-2.14.0
test $UID = 0 && chown -R root:root .
./configure
make

# Become root to install it
su

rm -f /usr/local/lib/libxml++-2.*
make install
ldconfig

# Become yourself again
exit

cd
mkdir -p -m 0700 installed
rm -f installed/libxml++-2.*.tar.*
mv libxml++-2.14.0.tar.bz2 installed/


# If you ever want to uninstall libxml++ 1.x, this should do it:
cd
su
test -d src/libxml++-1.* && ( cd src/libxml++-1.* ; make uninstall )
test -d /usr/local/include/libxml++-1.0 &&
 rm -f /usr/local/include/libxml++-1.0
rm -f /usr/local/lib/libxml++-1.* \
 /usr/local/lib/pkgconfig/libxml++-1.0.pc
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "libxml++-1.*" -exec rm -r {} \;
rm -f ~/installed/libxml++-1.*.tar.*


# If you ever want to uninstall libxml++ 2.x, this should do it:
cd
su
test -d src/libxml++-2.* && ( cd src/libxml++-2.* ; make uninstall )
find /usr/local/include -maxdepth 1 -type d -name "libxml++-2.*" \
 -exec rm -r {} \;
find /usr/local/share/doc -maxdepth 1 -type d -name "libxml++-2.*" \
 -exec rm -r {} \;
rm -f /usr/local/lib/libxml++-2.* /usr/local/lib/pkgconfig/libxml++-2.*.pc
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "libxml++-2.*" -exec rm -r {} \;
rm -f ~/installed/libxml++-2.*.tar.*

Back to the list


Last updated: Wed, 29 Apr 2020 22:04:50 -0400
Jason Englander <jason at englanders dot us>