Skip to content

Instantly share code, notes, and snippets.

@dlo
Forked from lambdalisue/patch.sh
Last active October 1, 2015 02:18
Show Gist options
  • Save dlo/1901496 to your computer and use it in GitHub Desktop.
Save dlo/1901496 to your computer and use it in GitHub Desktop.
Ubuntu 11.10 Python Image Library (PIL) 1.1.7 installation via pip patch
#!/bin/sh
# Ref: http://ubuntuforums.org/showthread.php?t=1751455
# Uninstall PIL
# sudo pip uninstall PIL -q
# Install required libs
apt-get --yes install build-essential python-dev zlib1g-dev liblcms1-dev libjpeg8 libjpeg62-dev libfreetype6 libfreetype6-dev
# Link to correct location
if [ -d /usr/lib/x86_64-linux-gnu ]; then
# Ubuntu 11.04 64bit
ln -sf /usr/lib/x86_64-linux-gnu/libfreetype.so /usr/local/lib/
ln -sf /usr/lib/x86_64-linux-gnu/libz.so /usr/local/lib/
ln -sf /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/local/lib/
elif [ -d /usr/lib/i386-linux-gnu ]; then
ln -sf /usr/lib/i386-linux-gnu/libfreetype.so.6 /usr/local/lib/
ln -sf /usr/lib/i386-linux-gnu/libz.so /usr/local/lib/
ln -sf /usr/lib/i386-linux-gnu/libjpeg.so.62 /usr/local/lib/
fi
# sudo pip install PIL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment