1. 程式人生 > >ubuntu 上OError: decoder jpeg not available問題解決

ubuntu 上OError: decoder jpeg not available問題解決

原因是PIL安裝不全導致:

去我的網盤下載需要的軟體包:

http://pan.baidu.com/s/1hqCUJB2

共5個檔案,分別解壓,一次進入zlib,libpng,freetype,jpeg目錄,執行下面命令

./configure --prefix=/usr/local

 make
 sudo make install

然後再執行下面的命令:

sudo apt-get install libjpeg8-dev 
sudo apt-get install libpng12-dev
sudo apt-get install libfreetype6-dev
sudo apt-get install zlib1g-dev


現在進入IMage目錄

修改setup.py
修改如下: 
JPEG_ROOT = "/usr/local/lib"
ZLIB_ROOT = "/usr/local/lib"
FREETYPE_ROOT = "/usr/local/lib"

檢查:

python setup.py build_ext -i

如果下面這樣就ok了,如果報錯:freetype/fterrors.h: 沒有那個檔案或目錄,就到/usr/include下面執行 sudo ln -s freetype2 freetype命令,然後重新檢查.

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


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

正式安裝:

python setup.py build

 sudo python setup.py install

參考:http://www.ithao123.cn/content-8103388.html


相關推薦

ubuntu OError: decoder jpeg not available問題解決

原因是PIL安裝不全導致: 去我的網盤下載需要的軟體包: http://pan.baidu.com/s/1hqCUJB2 共5個檔案,分別解壓,一次進入zlib,libpng,freetype,jpeg目錄,執行下面命令 ./configure --prefix=/usr/

python(django) 使用PIL報錯IOError at decoder jpeg not available

搜尋了以下,錯誤原因是PIL的jpg圖片支援元件沒有安裝 1、先刪除安裝的PIL $ rm -rf /usr/lib64/python2.6/site-packages/PIL $ rm /usr/lib64/python2.6/site-packages/PIL.pth我64位伺服器,如果32位就是在

ORA-01034: ORACLE not available解決

process port ron style 監聽 all rom partition class 問題現象: alter user scott account unlock; ERROR at line 1:ORA-01034: ORACLE not availabl

The following signatures couldn't be verified because the public key is not available 解決方法

upd ack AD ase itl no_pubkey sig TP ubun 今天試圖把 deepin 的軟件源加到我到 Ubuntu 16.04 中去。 在 deepin wiki 上看到一個教程。 在 /etc/apt/sources.list 中加上 deepin

Ubuntu,tftpd-hpa 啟動失敗的解決方法.

Ubuntu 9.04有時出現啟動tftp服務(tftpd-hpa)失敗, 檢視系統日誌: #tail /var/log/syslog 知道tftp啟動失敗的原因是: cannot bind to local socket: Address already in use.

zipimport.ZipImportError: can't decompress data; zlib not available 解決辦法

第一步,下載python-pip的tar包 # wget https://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz --no-check-certificate 由於下載pip是基於https協議的,故需要在wget u

UbuntuNFS的安裝配置(問題解決版)

On the master node, edit your /etc/hosts.allow file to allow connections from slave nodes. If your cluster LAN is on 192.168.1.0/24, your hosts.allow will

Oracle資料庫錯誤 ORACLE not available 解決方法

執行 exp、imp或sqlplus等命令時發生以下錯誤: EXP-00056: ORACLE error 1034 encountered ORA-01034: ORACLE not available ORA-27101: shared memory realm d

Python安裝常見問題:zipimport.ZipImportError: can't decompress data; zlib not available 解決辦法

htm www. article sdn data install details err 解決 centos7安裝python3.7.2時,報錯,解決如下 yum -y install zlib* 參考: https://blog.csdn.net/u0147

啟動MyEclipse出現"Source not found for JdbcOdbcDriver.finalize() line: not available"解決

環境:MyEclipse 6.5+Tomcat 6.0.26 問題:啟動MyEclipse出現"Source not found for JdbcOdbcDriver.finalize() line: not available" 解決:找到MyEclipse的工作空間,

ubuntu 18.04 virtualbox 5.02 could not insert 'vboxdrv': Required key not available 問題解決方法

核心版本變更,開啟了Secure Boot的電腦上模組必須註冊才允許執行,解決問題的辦法就是註冊這些模組。 一、找到MOK.priv地址並進入 locate MOK.priv 二、建立簽名 openssl req -new -x509 -newkey rsa:2

ubuntuvirtualbox無法找到usb設備【解決

gin windows 7 provide acl failure desc bottom tick cti How to set up USB for Virtualbox? USB in different versions of Virtual Box For u

Ubuntu下apt-get出現“no public key available…”解決方法

no public key available…解決方法如果出現W: There is no public key available for the following key IDs:3B4FE6ACC0B21F32可使用命令apt-key adv --recv-keys --keyserver keys

The requested resource is not available解決辦法

localhost 們的 wid lib ava 路徑 available 方法 dex 以"HTTP Status 404(The requested resource is not available)"示例 HTTP Status 404(The re

Ubuntu source: not found解決辦法

source:note foundUbuntu source: not found解決辦法:# dpkg-reconfigure dash(需在root下執行)選擇no 本文出自 “linux” 博客,請務必保留此出處http://yangzhiming.blog.51cto.com/4849999/1980

ubuntu終端執行shell腳本報command not found解決方法

flow logs install post pos not-found stack work href 使用sudo執行腳本報錯:sudo: myshell.sh: command not found 原因:發生這種情況的原因是因為您正在嘗試執行的腳本需要正確的權限 解決

一文徹底解決UbuntuPHP的安裝以及版本切換

code mbed 答案 repos erp res tin 如果 怎麽辦 Ubuntu上官方的源,比如 Ubuntu14.04 默認源中的是 PHP5.6.x、Ubuntu16.04 默認源中的是 PHP7.0.x,那麽如果想在 Ubuntu16.04 上安裝 PHP7.

Docker隨筆:Hyper-V PowerShell Module is not available報錯解決方法

eas 詳細 返回 create err 虛擬 releases mod doc 當在win10使用docker-machine創建Hyper-v虛擬機時,返回了一個錯誤”Error with pre-create check: "Hyper-V PowerShell Mo

由於手賤引起的一場血案--刪了綁定在ubuntu的python的解決方案

重啟 事情 一場 設置 不同的 www. 分區 ios win10 就在今天,我想著給我的電腦(ubuntu系統)裝一個python的工具包setuptools,結果使用apt-get來下載軟件時老是在一個resources的依賴項上出問題(現在我也沒有搞懂到底怎麽解決,後

vsftp傳553 Could not create file錯誤解決

搭建一個ftp伺服器,我使用Centos 7作業系統,安裝好vstfpd,建立了使用者等操作。在Windows客戶端可以正常的連線,但是當上傳檔案時,總是報553 Could not create file錯誤資訊。 試了網上的各種許可權方法都不行,如果確定讀寫修改都有了,那就是selinux限