我正在尝试在我的Debian 7.2机器上安装最近的libxml2-2.9.1。通过关注instructions,这就是我所做的,在我解压缩tar文件的目录中
% cd libxml2-2.9.1
% ./configure --prefix /home/user/libxml2-2.9.1
% make
% make install
在make install
结束时,我收到以下错误,
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
我无法理解这种失败。
究竟是怎么回事?我已经提供了前缀作为它具有写权限的目录,那么为什么要转到/usr/lib/
呢?
答案 0 :(得分:2)
libxml2 tarball还包含Python绑定,默认情况下会生成并安装到系统目录。如果您不需要Python绑定,最简单的解决方案是在没有Python支持的情况下进行编译:
./configure --without-python --prefix ...
如果您确实需要Python绑定,请尝试--with-python-install-dir=DIR
选项。