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?

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/

(happy Mint-Xampp-ing)

Khayrattee Wasseem's Picture

About Khayrattee Wasseem

PHP enthusiast | The PHP Community Fanboi | Founder of PHP Usergroup for Mauritius (#PhpMauritius) | Aspiring Entrepreneur | Ex-country Manager of a global award winning Magento Agency | Passionate about all things Wordpress & Servers



  1. 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. Thank you very much for this fine post. I was installing the memcache ext for xampp linux. Your post saved a lot of time.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.