Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"./configure --with-mysql=/usr/include/mysql/" fails with "configure: error: Invalid MySQL directory - unable to find mysql.h under /usr/include/mysql/" although "/usr/include/mysql/mysql.h" is present #11

Closed
krichter722 opened this issue Jun 12, 2016 · 6 comments

Comments

@krichter722
Copy link
Contributor

$ stat /usr/include/mysql/mysql.h 
  File: '/usr/include/mysql/mysql.h'
  Size: 29172       Blocks: 64         IO Block: 4096   regular file
Device: 16h/22d Inode: 5569333     Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2016-05-13 10:57:03.228144358 +0200
Modify: 2016-03-28 20:06:12.000000000 +0200
Change: 2016-05-04 11:08:00.626872422 +0200
 Birth: -

experienced with 9257ced

@Maxime2
Copy link
Owner

Maxime2 commented Jun 13, 2016

If it is standard MySQL location as it looks like it should work with
./configure --with-mysql

otherwise you need to point to top of the location:
./configure --with-mysql=/usr

@krichter722
Copy link
Contributor Author

Now I get it. May I suggest to change

  --with-mysql=DIR      Include MySQL support.  DIR is the MySQL base
                          install directory, default is to search through
                          a number of common places for the MySQL files.

to

  --with-mysql[=DIR]      Include MySQL support.  DIR is the MySQL installation prefix (e.g. `/usr`),
                          omitting DIR triggers a search through
                          a number of common places for the MySQL files.

because "base install directory" is hard to get, especially with the error message referring to mysql.h when configure wants include/mysql/mysql.h. Definitely useful to add an example no matter how DIR is called.

@ericfranzee
Copy link

You need to install the MySQL development files.

#sudo apt-get install mysql-devel
or
#sudo yum install mysql-devel

@itJunky
Copy link

itJunky commented Feb 22, 2022

What if i want to use Percona or MariaDB?

@sburn
Copy link
Contributor

sburn commented Feb 22, 2022

What if i want to use Percona or MariaDB?

Will work. Just make sure to client libs are in place.

@itJunky
Copy link

itJunky commented Feb 22, 2022

configure: error: Invalid MySQL directory - unable to find mysql.h under /usr/include/mariadb/mysql.h

ls -l /usr/include/mariadb/mysql.h

-rw-r--r-- 1 root root 41230 ноя 5 22:40 /usr/include/mariadb/mysql.h

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants