Cannot configure Sphinx to work with MySQL.

121 Aufrufe
Direkt zur ersten ungelesenen Nachricht

Justin Underwood

ungelesen,
30.03.2020, 07:30:4330.03.20
an Thinking Sphinx
I am using macOS Mojave 10.14.6.

I am trying to configure Sphinx to use MySQL database for a Ruby on Rails project.

I have been using Homebrew to install both Sphinx and MySQL. MySQL installs correctly with Homebrew.


I am experiencing errors running ./configure --with-mysql

I get the. error 

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
   your PATH environment variable.

To disable MySQL support, use --without-mysql option.


How should the include files be linked to? Should these files be installed manually. If so how.

Yours,

Justin Underwood









Pat Allan

ungelesen,
30.03.2020, 09:01:3130.03.20
an thinkin...@googlegroups.com
Hi Justin,

I’m not quite sure I’m understanding the situation you’re dealing with here. Normally, If you’re installing Sphinx via Homebrew, you shouldn’t need to run “./configure …” - that’s only required as part of the process of compiling Sphinx manually.

But also: due to the most recent releases of Sphinx being closed source, they’re not available on Homebrew - but, none of the open-source releases (latest v2.2.11) support MySQL v8. So, it can take a bit of wrangling to get the appropriate versions all installed - but I believe Sphinx on Homebrew does have a dependency explicitly for MySQL 5.7, so that should work.

If you want to use a modern Sphinx release (v3.1.1), then you’ll need to download the binaries for that instead from the Sphinx website. However, I’ve found that it doesn’t allow empty indices (so, using it with SQL-backed indices and deltas isn’t an option) - I consider this a bug, but perhaps it’ll never be fixed. v3.1.1 was released 18 months ago, and there haven’t been any changes since.

A slightly different option is to use Manticore instead, which began as a fork of Sphinx but is under active development. Thinking Sphinx will work with Manticore (the related executables for both projects have the same names), so this may be a worthwhile alternative to explore.

The short version:

  • Want to use SQL-backed indices? Use Sphinx v2.2.11 and MySQL v5.7 (which is what Homebrew should install).
  • Want to use real-time indices? Sphinx v2.2.11 is fine, but you can also install the binaries for v3.1.1
  • Want to use a more active search project with Thinking Sphinx (with either SQL-backed or real-time indices)? Give Manticore a shot.

If any of these paths don’t work, do let me know.

Cheers,

— 
Pat

--
You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thinking-sphi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/thinking-sphinx/e098a07e-dc4c-4efa-ae2b-9a295fb53100%40googlegroups.com.

Justin Underwood

ungelesen,
30.03.2020, 09:31:4530.03.20
an thinkin...@googlegroups.com
Thanks very much Pat.  I’ll try using brew for Sphinx v2.2.11 and MySQL v5.7.

Justin

Justin Underwood

ungelesen,
02.04.2020, 09:24:3702.04.20
an Thinking Sphinx
Dear Pat Allan,

Thanks very much for your help, I think you are right. MySQL2 was affected by an old MySQL installation.

For the record, this worked:

Removed all installations of MySQL and Sphinx
  brew uninstall mysql, brew uninstall mysql@5.7
  brew uninstall sphinx

Reinstalled MySQL@5.7 and Sphinx
  brew install mysql@5.7
  brew install sphinx

Ran 'gem install mysql2' from command line including the following '--with' flags. I think the path to 'mysql_config' is what made this work. This seems to correct the earlier error 
  Cannot find mysql_config at /usr/local/bin/mysql_config
when running gem install mysql2 without the flags.

  gem install mysql2 --    --with-mysql-config=/usr/local/Cellar/mysql@5.7/5.7.29/bin/mysql_config --with-cflags=\"-I/usr/local/opt/openssl/include\" --with-ldflags=\"-L/usr/local/opt/openssl/lib\"


Yours,
Justin Underwood

Pat Allan

ungelesen,
02.04.2020, 09:25:3302.04.20
an 'Justin Underwood' via Thinking Sphinx
Great to hear, and thanks for sharing the solution! :)

— 
Pat

--
You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thinking-sphi...@googlegroups.com.
Allen antworten
Antwort an Autor
Weiterleiten
0 neue Nachrichten