httpd调用/opt/local/bin/convert直接crash,求解决方案

2012-05-14 23:58:58 +08:00
 amirfish
最近在Lion下通过php执行下面的代码直接crash,曾经是正常的。
exec('/opt/local/bin/convert -resize 100x100 old.png new.png');

在终端下直接 /opt/local/bin/convert -resize 100x100 old.png new.png 则正常。

看日志提示如下:

Process: convert [2877]
Path: /opt/local/bin/convert
Identifier: convert
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: httpd [2481]

Date/Time: 2012-05-14 23:20:04.789 +0800
OS Version: Mac OS X 10.7.4 (11E53)
Report Version: 9

Crashed Thread: 0

Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000

Application Specific Information:
dyld: launch, loading dependent libraries

Dyld Error Message:
Library not loaded: /opt/local/lib/libjpeg.8.dylib
Referenced from: /opt/local/bin/convert
Reason: Incompatible library version: convert requires version 13.0.0 or later, but libjpeg.8.dylib provides version 12.0.0

Binary Images:
0x102864000 - 0x102864ff7 +convert (??? - ???) <D3B8CBAF-A97A-38BD-8DEB-230A4E8472A4> /opt/local/bin/convert
0x102869000 - 0x102a17fff +libMagickCore.5.dylib (6.0.0 - compatibility 6.0.0) <32BFE5BA-BD34-3C15-B1D1-89E8D0050767> /opt/local/lib/libMagickCore.5.dylib
0x102ab7000 - 0x102bb3fff +libMagickWand.5.dylib (6.0.0 - compatibility 6.0.0) <CB0EB595-8DC6-322C-922E-4CA84061B898> /opt/local/lib/libMagickWand.5.dylib
0x102bd2000 - 0x102c0ffff +liblcms2.2.dylib (3.3.0 - compatibility 3.0.0) <5AD21631-C613-3FC3-BE20-85D53349133C> /opt/local/lib/liblcms2.2.dylib
0x102c20000 - 0x102c77fff +libtiff.3.dylib (13.5.0 - compatibility 13.0.0) <74B2C3F6-C8B5-3602-BE74-8CA20B3C0FBA> /opt/local/lib/libtiff.3.dylib
0x102c85000 - 0x102cbafe7 +libjpeg.8.dylib (12.0.0 - compatibility 12.0.0) <96E62140-0ECC-3E48-B4B2-0B7D30B16FC4> /Applications/MAMP/*/libjpeg.8.dylib
0x7fff62464000 - 0x7fff62498baf dyld (195.6 - ???) <0CD1B35B-A28F-32DA-B72E-452EAD609613> /usr/lib/dyld
0x7fff926fb000 - 0x7fff92728fe7 libSystem.B.dylib (159.1.0 - compatibility 1.0.0) <095FDD3C-3961-3865-A59B-A5B0A4B8B923> /usr/lib/libSystem.B.dylib


也下载了jpegsrc.v8d.tar.gz重新编译,替换了/usr/local/lib/下的libjpeg.8.dylib,未能解决。

求指点。
4028 次点击
所在节点    编程
2 条回复
hexchain
2012-05-15 00:01:33 +08:00
/opt/local/lib/libjpeg.8.dylib

应该替换这个吧…
amirfish
2012-05-15 00:08:56 +08:00
噢,说错了。

是替换了 /opt/local/lib/libjpeg.8.dylib,未能解决。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/35936

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX