dyld:未加载库:/usr/local/lib/libpng16.16.dylib与任何与PHP相关的内容 [英] dyld: Library not loaded: /usr/local/lib/libpng16.16.dylib with anything php related

查看:261
本文介绍了dyld:未加载库:/usr/local/lib/libpng16.16.dylib与任何与PHP相关的内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用任何php应用程序都会导致:

Using any php application results in:

dyld: Library not loaded: /usr/local/lib/libpng15.15.dylib
Referenced from: /usr/local/bin/php
Reason: image not found
[1]    4494 trace trap  php

我的大多数php应用程序都是使用自制软件安装的,但composer除外(使用curl安装)

Most of my php applications were installed using homebrew with the exception of composer (installed using curl)

我尝试删除libpng并使用自制软件重新安装无济于事.

I tried removing the the libpng and reinstalling with homebrew to no avail.

下一步是按照错误消息中的说明切换到libpng 1.5的最新版本:

Next was to switch to latest version of libpng 1.5 as stated in the error message:

$ brew info libpng
libpng: stable 1.6.10 (bottled) 
http://www.libpng.org/pub/png/libpng.html
/usr/local/Cellar/libpng/1.5.17 (15 files, 1.0M)
Poured from bottle
/usr/local/Cellar/libpng/1.5.18 (15 files, 1.0M)
Poured from bottle
/usr/local/Cellar/libpng/1.6.10 (17 files, 1.3M) *

$ brew switch libpng 1.5.18
Cleaning /usr/local/Cellar/libpng/1.5.17
Cleaning /usr/local/Cellar/libpng/1.5.18
Cleaning /usr/local/Cellar/libpng/1.6.10
16 links created for /usr/local/Cellar/libpng/1.5.18

现在错误已更改为:

dyld: Library not loaded: /usr/local/lib/libpng16.16.dylib
Referenced from: /usr/local/lib/libfreetype.6.dylib
Reason: image not found
[1]    6993 trace trap  phpunit

我正在运行Mavericks(10.9.2)和PHP 5.5.1.

Im running Mavericks (10.9.2) and PHP 5.5.1.

提前谢谢!

推荐答案

我建议您运行:

$ brew update && brew upgrade

直到几分钟前,我也遇到了这个问题.因为我有一个最新的PHP版本,所以我用以下方法解决了它:

Until couple of minutes ago I had this problem, too. Because I have an up to date PHP version, I solved it with:

$ brew reinstall php55

希望有帮助.

这篇关于dyld:未加载库:/usr/local/lib/libpng16.16.dylib与任何与PHP相关的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆