V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
amirfish
V2EX  ›  编程

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

  •  
  •   amirfish · 2012-05-14 23:58:58 +08:00 · 4029 次点击
    这是一个创建于 4610 天前的主题,其中的信息可能已经有所发展或是发生改变。
    最近在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,未能解决。

    求指点。
    2 条回复    1970-01-01 08:00:00 +08:00
    hexchain
        1
    hexchain  
       2012-05-15 00:01:33 +08:00
    /opt/local/lib/libjpeg.8.dylib

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

    是替换了 /opt/local/lib/libjpeg.8.dylib,未能解决。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2821 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 02:38 · PVG 10:38 · LAX 18:38 · JFK 21:38
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.