Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

libphp7.so requires version 12.0.0 or later

I have a fresh installation of OSX el capitan 10.11.2 and installed php7 using homebrew.Now getting following error

command

sudo apachectl -e info -k restart

error

httpd: Syntax error on line 171 of /private/etc/apache2/httpd.conf:
 Cannot load /usr/local/opt/php70/libexec/apache2/libphp7.so into server: dlopen(/usr/local/opt/php70/libexec/apache2/libphp7.so, 10):
 Library not loaded: /usr/local/opt/libxml2/lib/libxml2.2.dylib
  Referenced from: /usr/local/opt/php70/libexec/apache2/libphp7.so
  Reason: Incompatible library version: libphp7.so requires version 12.0.0 or later, but libxml2.2.dylib provides version 10.0.0

I have searched on google but didn't get any specific solution.

like image 834
BlackJack Avatar asked Dec 31 '15 06:12

BlackJack


1 Answers

Install libxml2 with brew,

brew install libxml2

add following line into ~/.bash_profile

export LIBRARY_PATH=/usr/local/Cellar/libxml2/2.9.4/lib/:$LIBRARY_PATH

The version "2.9.4" can be changed to current

like image 144
user3684669 Avatar answered Oct 19 '22 04:10

user3684669