1

When I run phpsize,get the following error:

$ cd /usr/local/xcache-2.0.0
$ 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:  
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.

I have installed xcode 4.3.2

slimboy
  • 55
  • 1
  • 2
  • 8

1 Answers1

3

You need autoconf utility to complete the installation. You can install Homebrew and then do

brew install autoconf

in Terminal. After that repeat XCache installation.

I prefer Homebrew because it's easy to use and it puts all its data in /usr/local and doesn't require you to provide sudo password. So it keeps less garbage in your system than for example MacPots. However, any package manager will help.

UPD: Don't forget to check if XCode has Command Line Tools installed

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
zysoft
  • 2,268
  • 1
  • 16
  • 21
  • Although my question was not solved, still thank you.I'll try other solutions. – slimboy Aug 16 '12 at 10:49
  • Where did you get xcache? Is it php extension source code? If so why it is placed in /usr/local ? I would expect you unzipping it in ~/Documents/xcache or ~/Downloads/xcache and building from there. Do this- Download XCache from http://xcache.lighttpd.net/#Downloads, unpack it, go into dir, run `phpize`, then `./configure` and then `make` and `make install` (of course if previous command succeeds) – zysoft Aug 16 '12 at 15:54
  • Yea,I have got xcache from xcache.lighttpd.net/#Downloads and unzipped. And Copy it to /usr/local/.Through the "CD /usr/local/xcache - 2.0.0" the command go into dir,and run phpize.I used to have such a operation,but faild. – slimboy Aug 17 '12 at 04:45
  • @slimboy, I recently upgraded to Mountain Lion and experienced the same issue you described. I got it fixed by installing Command Line Tools in XCode (Preferences -> Downloads) and then installing autoconf (I don't think the order makes any difference). After that it all configured fine. – zysoft Aug 27 '12 at 18:39
  • Yes. I installed Command Line Tools, autoconf and then unpacked extension, made phpize, ./configure and make. All went good. (before installing Command Line Tools phpize complained in the same way you described and failed) – zysoft Aug 28 '12 at 11:06
  • PHP is system installation or oneself also installed? Need to install PHP from source? My PHP is system comes with installation. – slimboy Aug 28 '12 at 13:23
  • I did it on system PHP install. – zysoft Aug 28 '12 at 14:24
  • Hehe,I don't know why? I try it again. Thank you! – slimboy Aug 29 '12 at 01:09
  • @zysoft,I found the reason. Because of my xcode not installed Command Line Tools. – slimboy Aug 31 '12 at 08:14