-
-
Save chengdh/7290588 to your computer and use it in GitHub Desktop.
修正PIL的错误问题
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Ref: http://ubuntuforums.org/showthread.php?t=1751455 | |
# Uninstall PIL | |
# sudo pip uninstall PIL -q | |
# Install required libs | |
yes | apt-get 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget -q -O - https://raw.github.com/gist/1901496/patch.sh | sudo bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment