Linux Mint + Xampp Error + ‘grep: /opt/lampp/include/php/main/php.h: No Such File Or Directory’

So you wanted to install an extension on Xampp.. you execute phpize by running something like: /opt/lampp/bin/phpize.. and boooom! You start getting some xampp error messages as shown below:

grep: /opt/lampp/include/php/main/php.h: No such file or directory
grep: /opt/lampp/include/php/Zend/zend_modules.h: No such file or directory
grep: /opt/lampp/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.

Solution To This Grep Error

You are getting this phpize grep error simply because you have installed the default common LAMP package for XAMPP, that is the normal final user version. This version is not equipped, with the source files and libraries, to build, compile and install extensions.
So, how will you do that?
ANSWER => Install the Xampp Devel package, aka the Xampp Development package.

Where To Get The Xampp Development package

You can download the Xampp Development package (Xampp Devel) on the same download page as the normal one, here! Just look for ‘Development package‘ and click to download! Bingo you have it!

How To Install Xampp Devel / Xampp Development Package?

Simple!
I assume you have by now already downloaded your package, mine at the time of this writing, is named as xampp-linux-devel-1.7.4.tar.gz.

To install, simply execute the following shell command: sudo tar xvfz xampp-linux-devel-1.7.4.tar.gz -C /opt

– NOTE: This extraction will extract and place those needed development libraries and source file inside your existing Lampp folder in /opt/lampp/

Voila!
(happy Mint-Xampp-ing)

If You Appreciate What I Do Here On Seven PHP :: 7PHP, You Could Consider:

  1. Following me on Twitter | @7php
  2. LIKE-ing my FaceBook page
  3. Subscribe to my Email List - see top-right subscription box
  4. Help diffuse this interview to the PHP ecosystem - Share & Spread the word as far as you can ==> That would be a FREE way to thank me
  5. Use my DigitalOcean referral link if you plan to use it as your VPS (it starts at only $5/month btw) or if you can refer it to your friends, highly appreciated.
  6. Support via Paypal donate - my Paypal ID is w@7php.com

{I'm thankful to your response(s)!}

Valuable Feedback / Comment / Review From People Like You

  1. Facundo says:

    Great! Thanks for this solution. When the console intended to compile, in this case, xdebug, I figured out that I was needing the sources. Just I didn’t know where to get them from. Sorry for my bad english, cheers from Argentina!

  2. Thanks a lot, this post saved me a ton of time!

  3. Thank you very much. Worked like a charm.
    I was intalling mongodb driver for xampp (ubuntu).

  4. Facundo, ajay and anD:

    glad my post was helpful. Thanks for the comment, cheers!

    //@7php

  5. George says:

    Thank you very much for this fine post. I was installing the memcache ext for xampp linux. Your post saved a lot of time.

  6. George glad to be useful :) + thanks for the comment, cheers!

  7. Mustapha A says:

    an easy way to solve the pb
    sudo apt-get install autoconf

Speak Your Mind

*