Installation Error:libxml2

1.1k views Asked by At

I am trying install recent libxml2-2.9.1 on my Debian 7.2 machine. By following the instructions, here is what I do, in the directory where I have extracted the tar file

% cd libxml2-2.9.1
% ./configure --prefix /home/user/libxml2-2.9.1
% make
% make install

At the end of make install, I get following error,

make[5]: Nothing to be done for `install-exec-am'.
 /bin/mkdir -p '/home/user/libxml2-2.9.1/Install/share/doc/libxml2-python-2.9.1'
 /usr/bin/install -c -m 644 TODO '/home/user/libxml2-2.9.1/Install/share/doc/libxml2-python-2.9.1'
 /bin/mkdir -p '/usr/lib/python2.7/dist-packages'
 /usr/bin/install -c -m 644 drv_libxml2.py libxml2.py '/usr/lib/python2.7/dist-packages'
/usr/bin/install: cannot remove `/usr/lib/python2.7/dist-packages/drv_libxml2.py': Permission denied
/usr/bin/install: cannot remove `/usr/lib/python2.7/dist-packages/libxml2.py': Permission denied
make[5]: *** [install-dist_pythonDATA] Error 1
make[5]: Leaving directory `/home/user/libxml2-2.9.1/python'
make[4]: *** [install-am] Error 2
make[4]: Leaving directory `/home/user/libxml2-2.9.1/python'
make[3]: *** [install-recursive] Error 1
make[3]: Leaving directory `/home/user/libxml2-2.9.1/python'
make[2]: *** [install] Error 2
make[2]: Leaving directory `/home/user/libxml2-2.9.1/python'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/user/libxml2-2.9.1'
make: *** [install] Error 2

I am unable to understand this failure. Whats going on exactly ? I have already supplied the prefix to be the directory where it does have the write permissions, then why go to /usr/lib/ at all?

1

There are 1 answers

0
nwellnhof On BEST ANSWER

The libxml2 tarball also contains Python bindings which are built and installed to a system directory by default. If you don't need the Python bindings, the easiest solution is to compile without Python support:

./configure --without-python --prefix ...

If you really need the Python bindings, try the --with-python-install-dir=DIR option.

Update: This issue should be fixed in libxml2 2.9.13.