PECL install error after upgrading to OSX 10.8

5,737

Solution 1

Turned out to be something ridiculously simple.

m4 is now located at /usr/local/bin/m4, something (maybe autom4te?) was looking for it at /usr/bin/m4. A quick symlink fixed the problem nicely.

Solution 2

Try installing by the following command (modify your path accordingly), e.g.:

M4=/Developer/usr/bin/m4 pecl install uploadprogress

Solution 3

It turns out you might need to agree to the XCode terms and conditions for M4. To do this, run:

sudo m4 version

and if it is the first time you've run it since an upgrade you will be prompted to read and agree the terms and conditions. After this, you can use it by re-running your previously desired command.

Share:
5,737

Related videos on Youtube

Clive
Author by

Clive

Just another web developer trying to keep the wolves from the door...

Updated on September 18, 2022

Comments

  • Clive
    Clive over 1 year

    I've just upgraded my OS to Mountain Lion and PECL is no longer working (it's on a test drive so no drama, but I'd like to get it working so I can upgrade the OS on my shiny new SSD as well).

    I'm using the native PHP installation, no macports/homebrew or anything like that.

    Running sudo pecl install uploadprogress (for example) produces the following terminal output:

    downloading uploadprogress-1.0.3.1.tgz ...
    Starting to download uploadprogress-1.0.3.1.tgz (9,040 bytes)
    .....done: 9,040 bytes
    4 source files, building
    running: phpize
    grep: /usr/include/php/main/php.h: No such file or directory
    grep: /usr/include/php/Zend/zend_modules.h: No such file or directory
    grep: /usr/include/php/Zend/zend_extensions.h: No such file or directory
    Configuring for:
    PHP Api Version:
    Zend Module Api No:
    Zend Extension Api No:
    autom4te: need GNU m4 1.4 or later: /usr/bin/m4
    ERROR: `phpize' failed
    

    I'm guessing the problem is the 3 grep lines. I've found several threads that suggest this is caused by XCode not being installed...but XCode is installed, and updated to the latest version (4.4). All the relevant symlinks to /Developer/usr/bin/* also exist as they should.

    m4 is currently at version: m4 (GNU M4) 1.4.13, so even though the output above contains a line pertaining to it, I don't think that can be the problem.

    I'm sure it's just a simple issue, anyone got any clues?