Failed-loading xdebug installation - xdebug.so, 9 no suitable image found

我的未来我决定 提交于 2021-01-28 05:21:57

问题


After installing xdebug extentions as follows

  • Download xdebug-2.6.0alpha1.tgz
  • Unpack the downloaded file
  • Run: cd xdebug-2.6.0alpha1
  • Run: phpize
  • Run: ./configure
  • Run: make
  • Run: cp modules/xdebug.so /usr/local/Cellar/php70/7.0.26_18/lib/php/extensions/no-debug-non-zts-20151012
  • Edit /usr/local/etc/php/7.0/php.ini and add the line zend_extension = /usr/local/Cellar/php70/7.0.26_18/lib/php/extensions/no-debug-non-zts-20151012/xdebug.so

I get the error when run php -v

Failed loading /usr/local/Cellar/php70/7.0.26_18/lib/php/extensions
/no-debug-non-zts-20151012/xdebug.so:  
dlopen(/usr/local/Cellar/php70/7.0.26_18/lib/php/extensions
/no-debug-non-zts-20151012/xdebug.so, 9): no suitable image found.  
Did find:
/usr/local/Cellar/php70/7.0.26_18/lib/php/extensions/no-debug-non-zts-20151012/xdebug.so: 
stat() failed with errno=20

When I use the service of Xdebug analyse popinfo() output, it will ask the exactly the same steps to do.

It am not sure what no suitable image found means. The path exists. Could anyone have any ideas how to fix it?


回答1:


I sorted the problem out by adding

export PATH="$(brew --prefix homebrew/php/php70)/bin:$PATH"

on .bash_profile.

PHP 7.1 came with OSX 10.13.2, so default path was set to the pre-packed php, which shows the error on phpinfo.



来源:https://stackoverflow.com/questions/47824263/failed-loading-xdebug-installation-xdebug-so-9-no-suitable-image-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!