Click to See Complete Forum and Search --> : configure error cannot find header files
i'm trying to install php-4.06 on a redhat 6.2 machine that already has mysql installed. when i run configure i get the error "configure: error: Cannot find header files under /usr/local/bin/mysql ". i've been running it with the command "./configure --with-mysql=/blah" trying different paths that i get from running "locate mysql".
i appreciate any help you can give.
thanks.
try --with-mysql=/usr if you use the RedHat RPM
I had the same problem and this worked for me! Thanks.
I still can't get it to work. I have tried a million things. grrr. hehe
I use to compile MySQL with --prefix=/soft/MySQL before trying to compile Apache with-mod_php under --prefix=/soft/Apache and --prefix=/soft/Php.
I've got the same problem with something like:
"..cannot find header files under /soft/MySQL"
BUT! When I try to compile with the option "--with-mysql" only, I mean without any path, Php use his own libraries and it works! Except that it give you a message saying that you can't use others modules like mod_perl or mod_auth, thing that is not possible in my case...
Also, I discovered later that MySQL has put his socket under /soft/MySQL/tmp/ on my demand and that Snort want it under /tmp/ .
So I decided to create a symlink under /tmp/mysql.sock pointing to /soft/MySQL/tmp/mysql.sock, and that trick fool Snort like expected...
All of this just to say that on my surprise, when I decided to try again this morning to compile Apache with mod_php, I noticed first that each time you do a ./configure for PHP, you have to clean everything because it cache your first --with-mysql=<path>. I used to delete all the structure of php and untar the source file again.
As soon as my MySQL was running, with the socket under /tmp/mysql.sock and as soon as I cleaned all the structure and do a fresh ./configure --with-mysql=/soft/MySQL, I got this:
checking for MySQL support... yes
checking for MySQL UNIX socket... /tmp/mysql.sock
And it pass!!!
So,
1- make sure that your mysql is RUNNING.
2- make sure that the socket is under /tmp/
3- start from scratch with ./configure
That should do it ;-)
Yves Boisjoly
UNIX Administrator
I'm still having this same problem.. I've tried all the suggestions here... this is my config line:
./configure --with-mysql=/usr --with-xml --with-apache=../apache --enable-track-vars
And this is my error.
configure: error: Cannot find header files under /usr
I installed mysql from the rpm.
It's probably something simple, but I have yet to find it. I tried Yves thing, with linking the mysqld.sock to /tmp/mysqld.sock, and killing the config.cache... no joy. Thanks alot for your help!
Ash
The file it seems to look for is mysql.h which comes in the mysql-devel package. Once that was installed, removed config.cache and did the ./configure and it works :)
PHP Builder
Copyright Internet.com Inc. All Rights Reserved.