在 mac 上安装 Sphinx 的问题

发布于 11-14 03:57 字数 3411 浏览 3 评论 0原文

使用 :-

LDFLAGS="-arch x86_64" ./configure --prefix=/usr/local --with-mysql=/usr/local/mysql-5.5.9-osx10.6-x86_64

O/p 进行编译来编译代码。

    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating src/Makefile
    config.status: creating libstemmer_c/Makefile
    config.status: creating sphinx.conf.dist
    config.status: creating sphinx-min.conf.dist
    config.status: creating config/config.h
    config.status: executing depfiles commands

    configuration done
    ------------------

    You can now run 'make' to build Sphinx binaries,
    and then run 'make install' to install them.

make 的 O/p:--

    g++ -DHAVE_CONFIG_H -I. -I../config  -DSYSCONFDIR="\"/usr/local/etc\"" -I/usr/local/include -I/usr/local/mysql-5.5.9-osx10.6-x86_64/include  -Os -g -fno-common -fno-strict-aliasing -arch x86_64   -Wall -g -D_FILE_OFFSET_BITS=64 -O3 -DNDEBUG -MT tests.o -MD -MP -MF .deps/tests.Tpo -c -o tests.o tests.cpp
    mv -f .deps/tests.Tpo .deps/tests.Po
    g++  -Wall -g -D_FILE_OFFSET_BITS=64 -O3 -DNDEBUG  -arch x86_64 -o tests tests.o libsphinx.a  -L/usr/local/mysql-5.5.9-osx10.6-x86_64/lib -lmysqlclient   -lpthread  -lodbc -lz -lexpat  -L/usr/local/lib  -lpthread
    Making all in test
    make[1]: Nothing to be done for `all'.
    make[1]: Nothing to be done for `all-am'.

make install 的 O/p:--

    Making install in src
    if test -d ../.svn; then svn info .. --xml | perl svnxrev.pl; fi;
    make  install-am
    test -z "/usr/local/bin" || ../config/install-sh -c -d "/usr/local/bin"
      /usr/bin/install -c 'indexer' '/usr/local/bin/indexer'
      /usr/bin/install -c 'searchd' '/usr/local/bin/searchd'
      /usr/bin/install -c 'search' '/usr/local/bin/search'
      /usr/bin/install -c 'spelldump' '/usr/local/bin/spelldump'
      /usr/bin/install -c 'indextool' '/usr/local/bin/indextool'
    make[3]: Nothing to be done for `install-data-am'.
    Making install in test
    make[1]: Nothing to be done for `install'.
    test -z "/usr/local/etc" || config/install-sh -c -d "/usr/local/etc"
     /usr/bin/install -c -m 644 'sphinx.conf.dist' '/usr/local/etc/sphinx.conf.dist'
     /usr/bin/install -c -m 644 'sphinx-min.conf.dist' '/usr/local/etc/sphinx-min.conf.dist'
     /usr/bin/install -c -m 644 'example.sql' '/usr/local/etc/example.sql'
    make  install-data-hook
    mkdir -p /usr/local/var/data && mkdir -p /usr/local/var/log

如果我尝试运行思考 sphinx 服务器:-

    rake thinking_sphinx:index
    (in /Users/mohit/projects/urbanAdda)
    sh: line 1: 26356 Trace/BPT trap          indexer 2>&1
    sh: line 1: 26359 Trace/BPT trap          indexer 2>&1

    Sphinx cannot be found on your system. You may need to configure the following
    settings in your config/sphinx.yml file:
      * bin_path
      * searchd_binary_name
      * indexer_binary_name

    For more information, read the documentation:
    http://freelancing-god.github.com/ts/en/advanced_config.html
    sh: line 1: 26361 Trace/BPT trap          indexer 2>&1
    Generating Configuration to /Users/mohit/projects/urbanAdda/config/development.sphinx.conf
    dyld: Library not loaded: libmysqlclient.16.dylib
      Referenced from: /usr/local/bin/indexer
      Reason: image not found

Compiling the code using :-

LDFLAGS="-arch x86_64" ./configure --prefix=/usr/local --with-mysql=/usr/local/mysql-5.5.9-osx10.6-x86_64

O/p for the compilation.

    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating src/Makefile
    config.status: creating libstemmer_c/Makefile
    config.status: creating sphinx.conf.dist
    config.status: creating sphinx-min.conf.dist
    config.status: creating config/config.h
    config.status: executing depfiles commands

    configuration done
    ------------------

    You can now run 'make' to build Sphinx binaries,
    and then run 'make install' to install them.

O/p for make:--

    g++ -DHAVE_CONFIG_H -I. -I../config  -DSYSCONFDIR="\"/usr/local/etc\"" -I/usr/local/include -I/usr/local/mysql-5.5.9-osx10.6-x86_64/include  -Os -g -fno-common -fno-strict-aliasing -arch x86_64   -Wall -g -D_FILE_OFFSET_BITS=64 -O3 -DNDEBUG -MT tests.o -MD -MP -MF .deps/tests.Tpo -c -o tests.o tests.cpp
    mv -f .deps/tests.Tpo .deps/tests.Po
    g++  -Wall -g -D_FILE_OFFSET_BITS=64 -O3 -DNDEBUG  -arch x86_64 -o tests tests.o libsphinx.a  -L/usr/local/mysql-5.5.9-osx10.6-x86_64/lib -lmysqlclient   -lpthread  -lodbc -lz -lexpat  -L/usr/local/lib  -lpthread
    Making all in test
    make[1]: Nothing to be done for `all'.
    make[1]: Nothing to be done for `all-am'.

O/p for make install:--

    Making install in src
    if test -d ../.svn; then svn info .. --xml | perl svnxrev.pl; fi;
    make  install-am
    test -z "/usr/local/bin" || ../config/install-sh -c -d "/usr/local/bin"
      /usr/bin/install -c 'indexer' '/usr/local/bin/indexer'
      /usr/bin/install -c 'searchd' '/usr/local/bin/searchd'
      /usr/bin/install -c 'search' '/usr/local/bin/search'
      /usr/bin/install -c 'spelldump' '/usr/local/bin/spelldump'
      /usr/bin/install -c 'indextool' '/usr/local/bin/indextool'
    make[3]: Nothing to be done for `install-data-am'.
    Making install in test
    make[1]: Nothing to be done for `install'.
    test -z "/usr/local/etc" || config/install-sh -c -d "/usr/local/etc"
     /usr/bin/install -c -m 644 'sphinx.conf.dist' '/usr/local/etc/sphinx.conf.dist'
     /usr/bin/install -c -m 644 'sphinx-min.conf.dist' '/usr/local/etc/sphinx-min.conf.dist'
     /usr/bin/install -c -m 644 'example.sql' '/usr/local/etc/example.sql'
    make  install-data-hook
    mkdir -p /usr/local/var/data && mkdir -p /usr/local/var/log

If I try to run thinking sphinx server:-

    rake thinking_sphinx:index
    (in /Users/mohit/projects/urbanAdda)
    sh: line 1: 26356 Trace/BPT trap          indexer 2>&1
    sh: line 1: 26359 Trace/BPT trap          indexer 2>&1

    Sphinx cannot be found on your system. You may need to configure the following
    settings in your config/sphinx.yml file:
      * bin_path
      * searchd_binary_name
      * indexer_binary_name

    For more information, read the documentation:
    http://freelancing-god.github.com/ts/en/advanced_config.html
    sh: line 1: 26361 Trace/BPT trap          indexer 2>&1
    Generating Configuration to /Users/mohit/projects/urbanAdda/config/development.sphinx.conf
    dyld: Library not loaded: libmysqlclient.16.dylib
      Referenced from: /usr/local/bin/indexer
      Reason: image not found

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

永言不败2024-11-21 03:57:07
sudo install_name_tool -change libmysqlclient.16.dylib /usr/local/mysql-5.5.9-osx10.6-x86_64//lib/libmysqlclient.16.dylib /usr/local/bin/indexer

sudo install_name_tool -change libmysqlclient.16.dylib /usr/local/mysql-5.5.9-osx10.6-x86_64//lib/libmysqlclient.16.dylib /usr/local/bin/searchd

解决了我的问题

sudo install_name_tool -change libmysqlclient.16.dylib /usr/local/mysql-5.5.9-osx10.6-x86_64//lib/libmysqlclient.16.dylib /usr/local/bin/indexer

and

sudo install_name_tool -change libmysqlclient.16.dylib /usr/local/mysql-5.5.9-osx10.6-x86_64//lib/libmysqlclient.16.dylib /usr/local/bin/searchd

solved my problem

月光色2024-11-21 03:57:07

动态链接器找不到 mysqlclient 库。
尝试将其安装路径添加到 DYLD_LIBRARY_PATH 环境变量中。
当/如果您计划重建它时,请将“-Wl,-rpath /path/to/lib”添加到 LDFLAGS。

The dynamic linker cannot find the mysqlclient library.
Try to add the path where it's installed to the DYLD_LIBRARY_PATH environment variable.
And when/if you plan to rebuild it, add "-Wl,-rpath /path/to/lib" to LDFLAGS.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文