mac dyld:未加载库 dyld: Library not loaded: /usr/local/opt/jpeg/lib/libjpeg.8.dylib

问题:

➜  ~ php -v

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

  Referenced from: /usr/local/bin/php

  Reason: image not found

[1]    39067 abort      php -v


缺少 libjpeg.8.dylib


解决方案

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

➜  ~ tar -xzvf jpegsrc.v8d.tar.gz 

cd jpeg-8d 

➜  jpeg-8d ./configure 

➜  jpeg-8d make

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

➜  jpeg-8d php -v

PHP 5.6.21 (cli) (built: Apr 29 2016 02:31:44) 

Copyright (c) 1997-2016 The PHP Group

Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies


参考

google搜索到解决方案

https://stackoverflow.com/questions/32703296/dyld-library-not-loaded-usr-local-lib-libjpeg-8-dylib-homebrew-php


你可能感兴趣的:(mac)