from:http://jj.isgeek.net/2011/09/install-pil-with-jpeg-support-on-ubuntu-oneiric-64bits/

I am posting this because it took me ages to figure out how to solve this one.

I could not get PIL to compile with JPEG, Zlib or freetype support on my virtualenv. I am using Ubuntu Oneiric Beta1 on a Lenovo Thinkpad X220. That is a 64bit installation.

As read in every blog post out there, you first need to install the system libraries so PIL can find them.

$ sudo apt-get install libjpeg libjpeg-dev libfreetype6 libfreetype6-dev zlib1g-dev

After that, your regular pip install PIL should work under most situations. In my case I was still seeing this summary after the installation:

    ---------------------------------------------------------------
*** TKINTER support not available
--- JPEG support not available
--- ZLIB (PNG/ZIP) support not available
--- FREETYPE2 support not available
*** LITTLECMS support not available
---------------------------------------------------------------

After a lot of googling around, I found this solution on Ubuntu forums.
It turns out that the APT installations put the libraries under /usr/lib/x86_64-Linux-gnu and PIL will search for them in /usr/lib/. So you have to create symlinks for PIL to see them.

# ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib
# ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so /usr/lib
# ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib

Now proceed and reinstal PiL, pip install -U PIL:

    ---------------------------------------------------------------
*** TKINTER support not available
--- JPEG support available
--- ZLIB (PNG/ZIP) support available
--- FREETYPE2 support available
*** LITTLECMS support not available
---------------------------------------------------------------

tada  !

Update:
I just had this issue again on Ubuntu Precise, I found a solution here:
http://www.sandersnewmedia.com/why/2012/04/16/installing-pil-virtualenv-ubuntu-1204-precise-pangolin/

# ln -s /usr/lib/`uname -i`-linux-gnu/libfreetype.so /usr/lib/
# ln -s /usr/lib/`uname -i`-linux-gnu/libjpeg.so /usr/lib/
# ln -s /usr/lib/`uname -i`-linux-gnu/libz.so /usr/lib/

Note the uname -i that prints the box’s arquitecture. This is a much more generic solution!

How to do it on Ubuntu Precise Pagolin 12.04

--------------------------------------------------------------------------------

后来根据http://effbot.org/downloads/#Imaging PIL源码安装包中的README方法解决更方便:

sudo apt-get install libjpeg62-dev
sudo apt-get install zlib1g-dev
sudo apt-get install libfreetype6-dev
sudo apt-get install liblcms1-dev

Install PIL with Jpeg support on Ubuntu Oneiric 64bit的更多相关文章

  1. Install PIL with Jpeg support on Raspbian Jessie

    参考: https://www.raspberrypi.org/forums/viewtopic.php?f=91&t=79379 在 树莓派(Raspbian Jessie) 上安装djan ...

  2. Install PIL on mac osX10.9

    follow this instruction: http://blog.csdn.net/liushuaikobe/article/details/8729652 and if you encoun ...

  3. 【转】install intel wireless 3165 driver for ubuntu 14.04.3

    [转]install intel wireless 3165 driver for ubuntu 14.04.3 Ubuntu 14.04.3 with 3.19 kernel can’t drive ...

  4. pip install PIL The _imagingft C module is not installed

    需要先删除PIL再进行安装 sudo pip uninstall -y PIL 删除PIL相关文件夹:/usr/local/bin/pil , usr/lib/python2.7/dist-packa ...

  5. python抠图与pip install PIL报错

    窗口命令pip install PIL(python3.6+selenium——2.53.1+pycharm) from PIL import Image from selenium import w ...

  6. Install and Enable Telnet server in Ubuntu Linux

    转:http://ubuntuguide.net/install-and-enable-telnet-server-in-ubuntu-linux 参考:http://auxnet.org/index ...

  7. Ubuntu 16.04安装ROS Kinetic详细教程 | Tutorial to Install and Configure ROS Kinetic on Ubuntu 16.04

    本文首发于个人博客https://kezunlin.me/post/e2780b93/,欢迎阅读! Tutorial to Install and Configure ROS Kinetic on U ...

  8. How-to Install VMware Tools on Debian Stretch 9 32/64bit Linux+GNU

    在虚拟机VMWARE上安装debian9 安装vmwaretools时候遇到问题 询问我IFCONFIG安装在哪里? 新版的debian不知道是用户权限问题还是使用了其他网络配置工具 vmwareto ...

  9. Install and Configure Apache Kafka on Ubuntu 16.04

    https://devops.profitbricks.com/tutorials/install-and-configure-apache-kafka-on-ubuntu-1604-1/ by hi ...

随机推荐

  1. Java项目案例:酒店前台客服管理系统

    import java.util.Scanner; public class HelloWorld { public static void main(String[] args){ String [ ...

  2. Android动画深入分析

    动画分类 Android动画可以分3种:View动画,帧动画和属性动画:属性动画为API11的新特性,在低版本是无法直接使用属性动画的,但可以用nineoldAndroids来实现(但是本质还是vii ...

  3. 利用openssl管理证书及SSL编程第2部分:在Windows上编译 openssl

    利用openssl管理证书及SSL编程第2部分:在Windows上编译 openssl 首先mingw的环境搭建,务必遵循下文: http://blog.csdn.net/ubuntu64fan/ar ...

  4. UNIX环境高级编程——线程与进程区别

    进程和线程都是由操作系统所体会的程序运行的基本单元,系统利用该基本单元实现系统对应用的并发性.进程和线程的区别在于: (1)一个程序至少有一个进程,一个进程至少有一个线程. (2)线程的划分尺度小于进 ...

  5. java设计模式---调停者模式

    中介者模式(Mediator):用一个中介对象来封装一系列的对象交互.中介者使各对象不需要显式地相互引用,从而使其耦合松散,而且可以独立地改变它们之间的交互.   通用类图:   举例:在一个公司里面 ...

  6. Ubuntu 14 安装Skype 4.3

    Ubuntu 14 安装Skype 4.3Step 1: 删除老版本sudo apt-get remove skype skype-bin:i386 skype:i386 sudo apt-get i ...

  7. Linux grep命令分析以及C语言版本的实现

    1.作用 Linux系统中grep命令是一种强大的文本搜索工具,它能使用正则表达式搜索文本,并把匹 配的行打印出来.grep全称是Global Regular Expression Print,表示全 ...

  8. Android官方技术文档翻译——IntelliJ 项目迁移

    本文译自Android官方技术文档<Migrating from IntelliJ Projects>,原文地址:http://tools.android.com/tech-docs/ne ...

  9. JNI设置C++与java的结合(2)

    我们可以看到其中有四个函数声明, Java_完整类名_方法名, 完整类名包括了包名, 例如demo.Sample1是完整类名, 对应的这里就是demo_Sample1. 在注释中我们可以看到这样一个东 ...

  10. Ext JS添加子组件的误区

    经常会有人问我,为什么我的Grid不能岁窗口的变得而自动调整.了解后,发现很多人都习惯在渲染子组件的时候将Gird渲染到容器内的一个div里,而这正是问题的所在. 在Ext JS的布局系统中,能控制到 ...