Skip to content

Instantly share code, notes, and snippets.

@joaodubas
Created May 21, 2014 11:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joaodubas/bbf6f9a990d8169ae0bf to your computer and use it in GitHub Desktop.
Save joaodubas/bbf6f9a990d8169ae0bf to your computer and use it in GitHub Desktop.
Install libxml2-python on ubuntu 14.04 by building libxml2 and libxslt1.1
#!/usr/bin/env python
# update system
apt-get -y -qq --force-yes update
# install needed system deps
apt-get -y -qq --force-yes install \
python-setuptools \
build-essential \
wget \
python-dev \
zlib1g-dev
# download libxml2 and libxslt1.1
mkdir /opt/src \
&& cd /opt/src \
&& wget ftp://xmlsoft.org/libxml2/libxml2-2.7.8.tar.gz \
&& wget ftp://xmlsoft.org/libxslt/libxslt-1.1.26.tar.gz \
&& tar -xzf libxml2-2.7.8.tar.gz \
&& cd /opt/src/libxml2-2.7.8 \
&& ./configure && make && make install \
&& cd /opt/src \
&& tar -xzf libxslt-1.1.26.tar.gz \
&& cd /opt/src/libxslt-1.1.26 \
&& ./configure && make && make install \
&& ldconfig -v
# install pip
easy_install pip
# install offending package
wget ftp://xmlsoft.org/libxml2/python/libxml2-python-2.6.21.tar.gz
pip install libxml2-python-2.6.21.tar.gz
# install othe package that depends upon libxml2 and libxslt1.1
pip install lxml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment