mac下PHP dyld: Library not loaded: /usr/local/opt/jpeg/lib/libjpeg.8.dylib

终端下下运行PHP-v 突然报错

$ php -v

dyld: Library not loaded: /usr/local/opt/jpeg/lib/libjpeg.8.dylib

Referenced from: /usr/local/bin/php

Reason: image not found

Abort trap: 6


解决方法

第一步:

wget -c http://www.ijg.org/files/jpegsrc.v8d.tar.gz

第二步:

cp ./.libs/libjpeg.8.dylib /usr/local/opt/jpeg/lib

第三步

tar xzf jpegsrc.v8d.tar.gz

cd jpeg-8d

./configure

make

第四步

cp ./.libs/libjpeg.8.dylib /usr/local/opt/jpeg/lib

你可能感兴趣的:(mac下PHP dyld: Library not loaded: /usr/local/opt/jpeg/lib/libjpeg.8.dylib)