Skip to content

Instantly share code, notes, and snippets.

@joaodubas
Created May 21, 2014 11:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joaodubas/d14aaba905757e72d9a0 to your computer and use it in GitHub Desktop.
Save joaodubas/d14aaba905757e72d9a0 to your computer and use it in GitHub Desktop.
Install libxml2-python on ubuntu 14.04 by pinning libxml2/libxslt1.1 to precise
#!/usr/bin/env bash
# enable precise source
echo "deb http://archive.ubuntu.com/ubuntu precise main universe" \
>> /etc/apt/sources.list
# update system
apt-get -y -qq --force-yes update \
# install needed deps
apt-get -y -qq --force-yes install \
python-setuptools \
build-essential \
wget \
python-dev \
libxml2/precise \
libxml2-dev/precise \
libxslt1.1/precise \
libxslt1-dev/precise \
zlib1g-dev
# install package that depends upon libxml2 and libxslt1.1 to show that both
# will not be upgraded
apt-get -y -qq --force-yes install \
libxmlsec1 \
libxmlsec1-dev \
libxmlsec1-openssl
# 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 other binding that depends on 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