>  기사  >  백엔드 개발  >  laravel-5 - mac php 执行命令出现PHP Warning

laravel-5 - mac php 执行命令出现PHP Warning

WBOY
WBOY원래의
2016-06-06 20:33:291072검색

在配置laravel5所需的mcrypt时,按照网上的说明步骤执行以下命令

  • tar zxvf php5.6.4
  • cd php5.6.4/ext/mcrypt/
  • ./configure
  • phpize
  • make
  • make install

之后每次执行php命令,例如php -v 或 composer 终端都会提示:

<code>PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php56/5.6.4/lib/php/extensions/no-debug-non-zts-20131226/mcrypt.so' - dlopen(/usr/local/Cellar/php56/5.6.4/lib/php/extensions/no-debug-non-zts-20131226/mcrypt.so, 9): image not found in Unknown on line 0
</code>

请问怎么修复这个问题,谢谢各位:D

回复内容:

在配置laravel5所需的mcrypt时,按照网上的说明步骤执行以下命令

  • tar zxvf php5.6.4
  • cd php5.6.4/ext/mcrypt/
  • ./configure
  • phpize
  • make
  • make install

之后每次执行php命令,例如php -v 或 composer 终端都会提示:

<code>PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php56/5.6.4/lib/php/extensions/no-debug-non-zts-20131226/mcrypt.so' - dlopen(/usr/local/Cellar/php56/5.6.4/lib/php/extensions/no-debug-non-zts-20131226/mcrypt.so, 9): image not found in Unknown on line 0
</code>

请问怎么修复这个问题,谢谢各位:D

是php的mcrypt的拓展没有安装,自己下载下来,手动编译一下将就好了

请先确认一下 mcrypt 的库文件是否在 /usr/local/Cellar/php56/5.6.4/lib/php/extensions/no-debug-non-zts-20131226/ 这个目录下

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.