Skip to content

Instantly share code, notes, and snippets.

@tentacode
Created November 20, 2012 11:17
Show Gist options
  • Save tentacode/4117353 to your computer and use it in GitHub Desktop.
Save tentacode/4117353 to your computer and use it in GitHub Desktop.
PHP 5.4 brew Mountain Lion
~$ apachectl -t
httpd: Syntax error on line 118 of /private/etc/apache2/httpd.conf: Cannot load /usr/local/Cellar/php54/5.4.0/libexec/apache2/libphp5.so into server: dlopen(/usr/local/Cellar/php54/5.4.0/libexec/apache2/libphp5.so, 10): Symbol not found: _environ\n Referenced from: /usr/local/Cellar/php54/5.4.0/libexec/apache2/libphp5.so\n Expected in: /usr/sbin/httpd\n in /usr/local/Cellar/php54/5.4.0/libexec/apache2/libphp5.so
~$ brew install php54 --with-mysql --with-intl --with-debug
==> Downloading http://www.php.net/get/php-5.4.8.tar.bz2/from/this/mirror
Already downloaded: /Library/Caches/Homebrew/php54-5.4.8
Warning: Backing up all known pear.conf and .pearrc files
Warning: If you have a pre-existing pear install outside
of homebrew-php, or you are using a non-standard
pear.conf location, installation may fail.
==> ./configure --prefix=/usr/local/Cellar/php54/5.4.8 --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc/php/5.4 --with-config-file-path=/usr/local/etc/php/5.4 --with-co
==> make
make: *** [libs/libphp5.bundle] Error 1
make: *** Waiting for unfinished jobs....
make: *** [sapi/cli/php] Error 1
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [sapi/cgi/php-cgi] Error 1
Error: uncaught throw `Failed executing: make '
Please report this bug:
https://github.com/mxcl/homebrew/wiki/troubleshooting
/usr/local/Library/Formula/abstract-php.rb:131:in `throw'
/usr/local/Library/Formula/abstract-php.rb:131:in `install'
/usr/local/Library/Homebrew/build.rb:137:in `install'
/usr/local/Library/Homebrew/formula.rb:225:in `brew'
/usr/local/Library/Homebrew/formula.rb:585:in `stage'
/usr/local/Library/Homebrew/extend/fileutils.rb:21:in `mktemp'
/usr/local/Library/Homebrew/formula.rb:581:in `stage'
/usr/local/Library/Homebrew/formula.rb:220:in `brew'
/usr/local/Library/Homebrew/build.rb:116:in `install'
/usr/local/Library/Homebrew/build.rb:43:in `main'
/usr/local/Library/Homebrew/build.rb:12
/usr/local/Library/Formula/php54.rb:24
@benji07
Copy link

benji07 commented Nov 20, 2012

Dans mon httpd.conf j'ai:

LoadModule php5_module /usr/local/opt/php54/libexec/apache2/libphp5.so

Si je fait un ll j'ai bien un lien entre ma version installé et le dossier opt

ll /usr/local/opt | grep php
lrwxr-xr-x  1 elao  admin  21 17 oct 11:08 php54 -> ../Cellar/php54/5.4.7
lrwxr-xr-x  1 elao  admin  30 18 oct 10:11 php54-memcache -> ../Cellar/php54-memcache/2.2.6
lrwxr-xr-x  1 elao  admin  28 16 oct 17:57 php54-xdebug -> ../Cellar/php54-xdebug/2.2.1

@benji07
Copy link

benji07 commented Nov 20, 2012

tu avais déjà une version de php installé via homebrew ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment