Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7944317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T00:31:01+00:00 2026-06-04T00:31:01+00:00

Developing locally in MAMP and need Sphinx to work with MAMP’s MySQL. Basically hitting

  • 0

Developing locally in MAMP and need Sphinx to work with MAMP’s MySQL. Basically hitting a dead end during $ sudo make.

MAMP installs without some necessary resources for Sphinx integration, mainly a mysql lib directory and an include directory filled with C header source files. These were downloaded and installed successfully (using CMake) into the following directories:

/Applications/MAMP/Library/include/mysql
/Applications/MAMP/Library/lib/mysql

After unzipping Sphinx and running:

sudo ./configure --prefix=/usr/local/sphinx --with-libstemmer --with-mysql=/Applications/MAMP/Library

I got:

******************************************************************************
ERROR: cannot find MySQL include files.

Check that you do have MySQL include files installed.
The package name is typically 'mysql-devel'.

If include files are installed on your system, but you are still getting
this message, you should do one of the following:

1) either specify includes location explicitly, using --with-mysql-includes;
2) or specify MySQL installation root location explicitly, using --with-mysql;
3) or make sure that the path to 'mysql_config' program is listed in

Changing the ./configure command to:

sudo ./configure --prefix=/usr/local/sphinx--with-libstemmer --with-mysql-includes /Applications/MAMP/Library/include --with-mysql-libs /Applications/MAMP/Library/lib

throws the following on the outset, but regardless results in a successful configuration:

configure: WARNING: you should use --build, --host, --target
configure: WARNING: invalid host type: /Applications/MAMP/Library/include
configure: WARNING: you should use --build, --host, --target
configure: WARNING: invalid host type: /Applications/MAMP/Library/lib

The log also has the following line, (which I think is relevant in a sec):

checking MySQL include files... -Iyes

Now, continuing, $ sudo make throws the following:

Making all in src
/bin/sh svnxrev.sh ..
make  all-am
g++ -DHAVE_CONFIG_H -I. -I../config  -DSYSCONFDIR="\"/usr/local/sphinx--with-libstemmer/etc\"" -DDATADIR="\"/usr/local/sphinx--with-libstemmer/var/data\"" -I/usr/local/include -Iyes   -Wall -g -D_FILE_OFFSET_BITS=64 -O3 -DNDEBUG -MT sphinx.o -MD -MP -MF .deps/sphinx.Tpo -c -o sphinx.o sphinx.cpp
In file included from sphinx.cpp:16:
sphinx.h:64:19: error: mysql.h: No such file or directory

... //whole bunch of errors follow, resulting from the above

So, I know mysql.h exists in my includes file, I think I have all necessary binaries as well, and the configuration seems to see the include files so I’m tearing out my hair a bit. I’m hoping this is a simple path problem, or a syntax error on my part with the ./configure attribute since this is my first time compiling and installing from the command line.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T00:31:02+00:00Added an answer on June 4, 2026 at 12:31 am

    Sphinx’s ./configure uses an unknown default value for --with-mysql, which is enabled by default, which could make you think calling it is not necessary.

    To get Sphinx to work with MAMP’s varyingly distributed MySQL files, make sure to use each of the following attributes in your ./configure command, specifying direct paths for each:

    --with-mysql= // root mysql app
    --with-includes= // path to mysql header includes
    --with-mysql-libs= // path to libmysqlclient.dylib files
    

    The final command that worked for me:

    ./configure --prefix=/usr/local/sphinx --with-libstemmer --with-mysql=/Applications/MAMP/Library --with-mysql-includes=/Applications/MAMP/Library/include/mysql --with-mysql-libs=/Applications/MAMP/Library/lib/mysql
    

    --prefix is your preferred install directory in usr/local and --libstemmer adds Snowball’s extended stemming functionality (if you downloaded it).

    If this runs without error, just make and make install and you’re good to go.

    Also note that there’s a configure error log in the uncompressed Sphinx directory that’s easy to overlook. Didn’t help in this scenario, but could be really useful to others if you’re having problems.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing an app locally (under Domain name <mydomain>.dev ). In order to work
So I am developing locally using Rails 3.2 and mysql. My local machine is
I've been developing / testing a site locally on a MAMP (e.g. LAMP) environment.
Developing a project of mine I realize I have a need for some level
Developing a C# .NET 2.0 WinForm Application. Need the application to close and restart
I just moved my site to an actual apache server (was developing locally before)
My Problem We are developing a locally-hosted web application for small businesses. We also
I have a Pyramid app that I've been developing and viewing locally through http://localhost:6543
I'm using flatpages in a site that I'm developing in a locally server. I
I have a general question about DB synchronisation. So, I'm developing a website locally

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.