English 中文(简体)
Django OS X Wrong JPEG 图书馆版本:图书馆80,打电话者预期62 sorl.thumbnail
原标题:Django OS X Wrong JPEG library version: library is 80, caller expects 62 sorl.thumbnail

使用or。 我的马奇地方的暴徒th忙,而且一直与自由党混为一谈,但今天终于设法安装了这台汽车,这给人留下了一些麻烦。

I can now upload and use images - but I cant resize them using sorl.thumbnail.

一经尝试,就会产生以下错误:

Wrong JPEG library version: library is 80, caller expects 62

是否有人知道解决这一问题的好办法。

我全心全意地知道,无论哪一种 s子用途都要求更早的布吉普文,或者说,在我的所有机器中,仍然有某种幽灵的安装。

我有:

  1. PIL 1.1.7
  2. libjpeg 8.

谁知道这种做法?

问题回答

For the benefit of the people from the future who are encountering this error and don t know why, I d like to post my findings. I hope to give a general understanding of what s gone wrong since the exact commands to fix it may be different on your machine than on my OSX Lion install.

首先,由于在可能的解决办法中很容易丢失,必须理解,错误信息在“<代码>”时是正确的。 Wrong JPEG的图书馆版本:图书馆80,打电话者预期<62/code>,或627080的其他组合。 这些数字与不同的校准版本相对应。 这里有两部移动式图书馆,有动态装满的jpeg图书馆和PIL(或Pillad)安装。 错误的意思是,贵图书馆的安装是用6.2版的头盔汇编的,但在装上实际共享的图书馆时,与8版连接。

定本是download,建造和安装你想要的校准版本(尽管以后版本在OSX狮子上更为容易):

 wget http://www.ijg.org/files/jpegsrc.v8d.tar.gz
 tar xzf jpegsrc*
 cd jpeg-*
 ./configure
 make
 sudo make install

This should drop 2 files of note in /usr/local/ . Namely /usr/local/lib/libjpeg.8.dylib and /usr/local/include/jpeglib.h. Now we just have to get PIL (or Pillow) to use these two files at install time, and we re home free. I know there s a better way to do this, but the hack (as recommended by the PIL docs) is to edit the setup.py file of the PIL distribution before you install it. You may get away with just setting JPEG_ROOT = libinclude( /usr/local ) near the top of setup.py, though further directory manipulation may be necessary elsewhere in the file.

由于你走了这条道路,你必须保证,在你检验这是否与适当的图书馆连接之前,临时自治机构会进行充分的重建。 我使用了如下指挥系统:rm -rfbuilding && python setup。 安装,以确保图书馆始终与目前测试的道路一新链接。

我很抱歉,这是一个令人痛心的答案,但令人非常沮丧的是,它尝试了所有其他复制和复制件;在那里找到了过去的解决办法,而且没有任何工作。 希望这一答案至少使少数民间人士在寻求简单解决办法时不浪费数小时。

Good Luck!

如果安装了玉米,你应:

$ sudo port selfupdate
$ sudo port install py27-pil

这种方法比单体法容易,因为港口安装了适当的附属设施。

我的问题与《任择议定书》略有不同,但我要在这里分享我的解决办法,帮助今后有人。

OS: OSX El Capitan I installed libjpeg-turbo from the precompiled binaries on their website. However, I did not know that I already had a different version of libjpeg installed on my mac. I was building my c file like this gcc myfile.c -o myfile.out -L /opt/libjpeg-turbo/lib -ljpeg. This got the library from the correct location, but the the linker was getting the included header file jpeglib.h from the pre-installed location. I changed my build command to this: gcc myfile.c -o myfile.out -I/opt/libjpeg-turbo/include/ -L /opt/libjpeg-turbo/lib -ljpeg and it worked. No more library is 80, caller expects 62!

同先前的回答一样,我的问题与禁止化学武器组织略有不同,但我要在这里分享我的解决办法,帮助未来的人。

为我工作的唯一事情是,在安装了所需图书馆的dev<>/strong>版本后,迫使学生们从源头上建造药房(我的法典正在编辑一个小片,并用一个老板添加一个标签)。 这是因为使用3.73美元的ARM式嵌入式装置,从Ubultlav上空飞离。

apt-get install -y libjpeg-dev libfreetype6-dev
pip3 install pillow --global-option="build_ext" --global-option="--enable-jpeg" --global-option="--enable-freetype" 




相关问题
alternatives to jpeg_read_header libjpeg

So I m running into an issue using libjpeg on Windows which causes jpeg_read_header() to crash. The problem is (fairly hilariously) described here: http://sourceforge.net/projects/gnuwin32/forums/...

Pointer alignment in libjpeg

From jmorecfg.h: #define PACK_TWO_PIXELS(l,r) ((r<<16) | l) #define PACK_NEED_ALIGNMENT(ptr) (((int)(ptr))&3) #define WRITE_TWO_PIXELS(addr, pixels) do { ((INT16*)(addr))[0]...

libjpeg PIL django image display

I installed PIL. I can import PIL (with no error message) Then I ran the code mentioned here: Python images display And I get this error message: IOError: decoder jpeg not available I understand ...

centos libjpeg error _imaging

I am trying to get my libjpeg working with python with little or no luck. I have followed this tutorial to get it up and running http://blaolao.com/setting-up-django-mysql-mysql-python-pil-etc on my ...

C: WinAPI CreateDIBitmap() from byte[] problem

I have been working on this problem for a while now. I am trying to add JPEG support to a program with libjpeg. For the most part, it is working fairly well, But for some JPEGs, they show up like the ...

Is it possible to control which libraries apache uses?

Okay, so I had an earlier problem with PIL that is still unresolved. Someone else had this problem and had success by removing the old JPEG library. I can t really do that on my machine, however, as ...

How do you upgrade MAMP s PHP to PHP 5.3 ?

I haven t been able to find any resources on how to do this.. Anyone have any ideas or resources?! I ve tried changing the ./configure options and I m solving things one at a time but it seems like ...