无法安装Sphinx for OS X 10.9.5:'“/ lib / cpp”无法进行健全性检查'

时间:2014-11-22 22:42:38

标签: php c++ macos osx-mavericks sphinx

我已经安装了开发人员工具,重新启动了我的机器,安装了单独的g ++编译器等,但运行./configure仍然失败并出现此错误:error: C++ preprocessor "/lib/cpp" fails sanity check任何有关正确方向安装/的提示lib / cpp目录?谢谢!

此处的日志部分可能会有所帮助:

configure:4459: checking how to run the C++ preprocessor
configure:4490:  -E  conftest.cc
./configure: line 4491: -E: command not found
configure:4496: $? = 127
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "libsphinxclient"
| #define PACKAGE_TARNAME "libsphinxclient"
| #define PACKAGE_VERSION "0.0.1"
| #define PACKAGE_STRING "libsphinxclient 0.0.1"
| #define PACKAGE_BUGREPORT ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| /* end confdefs.h.  */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
|            Syntax error
configure:4490:  -E  conftest.cc
./configure: line 4491: -E: command not found
configure:4496: $? = 127
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "libsphinxclient"
| #define PACKAGE_TARNAME "libsphinxclient"
| #define PACKAGE_VERSION "0.0.1"
| #define PACKAGE_STRING "libsphinxclient 0.0.1"
| #define PACKAGE_BUGREPORT ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| /* end confdefs.h.  */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
|            Syntax error
configure:4490: /lib/cpp  conftest.cc
./configure: line 4491: /lib/cpp: No such file or directory
configure:4496: $? = 127
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "libsphinxclient"
| #define PACKAGE_TARNAME "libsphinxclient"
| #define PACKAGE_VERSION "0.0.1"
| #define PACKAGE_STRING "libsphinxclient 0.0.1"
| #define PACKAGE_BUGREPORT ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| /* end confdefs.h.  */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
|            Syntax error
configure:4490: /lib/cpp  conftest.cc
./configure: line 4491: /lib/cpp: No such file or directory
configure:4496: $? = 127
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "libsphinxclient"
| #define PACKAGE_TARNAME "libsphinxclient"
| #define PACKAGE_VERSION "0.0.1"
| #define PACKAGE_STRING "libsphinxclient 0.0.1"
| #define PACKAGE_BUGREPORT ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| /* end confdefs.h.  */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
|            Syntax error
configure:4573: result: /lib/cpp
configure:4597: /lib/cpp  conftest.cc
./configure: line 4598: /lib/cpp: No such file or directory
configure:4603: $? = 127
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "libsphinxclient"
| #define PACKAGE_TARNAME "libsphinxclient"
| #define PACKAGE_VERSION "0.0.1"
| #define PACKAGE_STRING "libsphinxclient 0.0.1"
| #define PACKAGE_BUGREPORT ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| /* end confdefs.h.  */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
|            Syntax error
configure:4597: /lib/cpp  conftest.cc
./configure: line 4598: /lib/cpp: No such file or directory
configure:4603: $? = 127
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "libsphinxclient"
| #define PACKAGE_TARNAME "libsphinxclient"
| #define PACKAGE_VERSION "0.0.1"
| #define PACKAGE_STRING "libsphinxclient 0.0.1"
| #define PACKAGE_BUGREPORT ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| /* end confdefs.h.  */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
|            Syntax error
configure:4672: error: C++ preprocessor "/lib/cpp" fails sanity check
See 'config.log' for more details.

1 个答案:

答案 0 :(得分:4)

CXXCPP="gcc -E" ./configure
make
sudo make install

通过http://www.labelmedia.co.uk/blog/installing-sphinx-and-pecl-sphinx-on-mac-os-x.html