Skip to content

Instantly share code, notes, and snippets.

@ernestom
Created February 22, 2013 00:04
Show Gist options
  • Select an option

  • Save ernestom/5009630 to your computer and use it in GitHub Desktop.

Select an option

Save ernestom/5009630 to your computer and use it in GitHub Desktop.
Fixes PIL's "corrput image" errors in ubuntu.
sudo ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so /usr/lib/
sudo ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib/
sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib/
sudo apt-get remove libjpeg-dev -y
sudo rm -rf /usr/local/lib/python2.7/dist-packages/PIL
sudo rm -rf /usr/local/lib/python2.7/dist-packages/PIL.pth
sudo apt-get install libjpeg-dev -y
sudo pip install PIL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment