2017-01-27 4 views
2

brew을 사용하여 php70 및 php70-xdebug를 설치했습니다.PHP가 API NTS 디버그로 빌드되었으므로 Xdebug를로드 할 수 없습니다.

brew install php70 
brew install php70-xdebug 

php -v 반환이 오류 :

Cannot load Xdebug - it was built with configuration API320151012,NTS, whereas running engine is API320151012,NTS,debug

내가 컴파일러에 --disable-debug을 전달하는 방법을 알아낼 수 없습니다가, 양조는 사전 식 (https://github.com/Homebrew/homebrew-php)를 사용하며,이 옵션을 설정하는 것을 허용하지 않습니다 .

문제점 : xdebug 공식에 --disable-debug이 있고 php70 공식에 옵션 --with-debug이 있지만이 인수를 사용하지 않더라도 --enable-debug이 configure 명령에 추가됩니다.

답변

3

해결 방법을 찾았지만 완벽하지는 않지만 작동합니다! brew edit php70-xdebug와 공식과는 configure 명령에 --enable-debug를 추가

  1. 편집 :

    system "./configure", "--prefix=#{prefix}", 
            phpconfig, 
            "--disable-dependency-tracking", 
            "--enable-xdebug", 
            "--enable-debug" 
    
  2. 다시 컴파일

    brew reinstall php70-xdebug --build-from-source 
    

같은 일뿐만 아니라 php70-opcache와 함께 작동 라이브러리.