y45871296 发表于 2014-6-2 10:27:04

程序需要用到mysql-devel 如何在lnmp编译后进行安装呢

系统是rhel6.2    编译一个分词搜索的时候
开源框架需要用到mysql-devel   
用yum 安装,会提示需要安装依赖的mysql
请军哥帮忙给看看
如何在lnmp编译后进行安装mysql-devel

licess 发表于 2014-6-2 21:08:30

这个默认都是有的
5.1在/usr/local/mysql/lib/mysql

5.5在/usr/local/mysql/lib/

y45871296 发表于 2014-6-3 08:02:19

安装时提示:mysql.h:没有那个文件或目录

Making all in src
make: Entering directory `/data/xueba/coreseek-4.1-beta/csft-4.1/src'
/bin/sh svnxrev.sh ..
makeall-am
make: Entering directory `/data/xueba/coreseek-4.1-beta/csft-4.1/src'
if g++ -DHAVE_CONFIG_H -I. -I. -I../config-DSYSCONFDIR="\"/usr/local/coreseek/etc\"" -DDATADIR="\"/usr/local/coreseek/var/data\"" -I/usr/local/include -I/usr/local/mysql/include/mysql-g -DUNIV_LINUX-I/usr/local/mmseg3/include/mmseg/   -Wall -g -D_FILE_OFFSET_BITS=64 -O3 -DNDEBUG -MT sphinx.o -MD -MP -MF ".deps/sphinx.Tpo" -c -o sphinx.o sphinx.cpp; \
      then mv -f ".deps/sphinx.Tpo" ".deps/sphinx.Po"; else rm -f ".deps/sphinx.Tpo"; exit 1; fi
在包含自 sphinx.cpp:16 的文件中:
sphinx.h:72:19: 错误:mysql.h:没有那个文件或目录
在包含自 /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/ext/hash_map:60 的文件中,
               从 /usr/local/mmseg3/include/mmseg/Segmenter.h:31,
               从 /usr/local/mmseg3/include/mmseg/SegmenterManager.h:33,
               从 tokenizer_zhcn.h:26,
               从 sphinx.cpp:2173:
/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/backward/backward_warning.h:28:2: 警告:#warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated.
In file included from sphinx.cpp:16:
sphinx.h:1827: 错误:ISO C++ 不允许声明无类型的‘MYSQL_RES’
sphinx.h:1827: 错误:expected ‘;’ before ‘*’ token
sphinx.h:1828: 错误:ISO C++ 不允许声明无类型的‘MYSQL_FIELD’
sphinx.h:1828: 错误:expected ‘;’ before ‘*’ token
sphinx.h:1829: 错误:‘MYSQL_ROW’没有命名一个类型
sphinx.h:1830: 错误:‘MYSQL’没有命名一个类型
In file included from /usr/local/mmseg3/include/mmseg/Segmenter.h:38,
               from /usr/local/mmseg3/include/mmseg/SegmenterManager.h:33,
               from tokenizer_zhcn.h:26,
               from sphinx.cpp:2173:
/usr/local/mmseg3/include/mmseg/mmthunk.h: In member function ‘u2 css::ChunkQueue::getToken()’:
/usr/local/mmseg3/include/mmseg/mmthunk.h:143: 警告:在有符号和无符号整数表达式间比较
/usr/local/mmseg3/include/mmseg/mmthunk.h:161: 警告:在有符号和无符号整数表达式间比较
sphinx.cpp: In function ‘bool Cmp(const SchemaRecord&, const SchemaRecord&)’:
sphinx.cpp:5409: 警告:数组下标类型为‘char’
sphinx.cpp:5410: 警告:数组下标类型为‘char’
sphinx.cpp: In destructor ‘virtual CSphQueryResult::~CSphQueryResult()’:
sphinx.cpp:6346: 警告:删除‘void*’未定义
sphinx.cpp: In member function ‘virtual int CSphIndex_VLN::DebugCheck(FILE*)’:
sphinx.cpp:15310: 警告:格式‘%li’需要类型‘long int’,但实参 5 的类型为‘int’
sphinx.cpp:15310: 警告:格式‘%li’需要类型‘long int’,但实参 6 的类型为‘int’
sphinx.cpp:15332: 警告:格式‘%li’需要类型‘long int’,但实参 5 的类型为‘int’
sphinx.cpp:15332: 警告:格式‘%li’需要类型‘long int’,但实参 6 的类型为‘int’
sphinx.cpp:15831: 警告:格式‘%u’需要类型‘unsigned int’,但实参 8 的类型为‘uint64_t’
sphinx.cpp:15831: 警告:格式‘%u’需要类型‘unsigned int’,但实参 10 的类型为‘uint64_t’
sphinx.cpp: In constructor ‘CSphSource_MySQL::CSphSource_MySQL(const char*)’:
sphinx.cpp:21306: 错误:类‘CSphSource_MySQL’没有名为‘m_pMysqlResult’的字段
sphinx.cpp:21307: 错误:类‘CSphSource_MySQL’没有名为‘m_pMysqlFields’的字段
sphinx.cpp:21308: 错误:类‘CSphSource_MySQL’没有名为‘m_tMysqlRow’的字段
sphinx.cpp: In member function ‘virtual void CSphSource_MySQL::SqlDismissResult()’:
sphinx.cpp:21317: 错误:‘m_pMysqlResult’在此作用域中尚未声明
sphinx.cpp:21320: 错误:‘m_pMysqlResult’在此作用域中尚未声明
sphinx.cpp:21322: 错误:‘mysql_free_result’在此作用域中尚未声明
sphinx.cpp:21328: 错误:‘m_tMysqlDriver’在此作用域中尚未声明
sphinx.cpp:21328: 错误:‘mysql_next_result’在此作用域中尚未声明
sphinx.cpp:21330: 错误:‘mysql_use_result’在此作用域中尚未声明
sphinx.cpp:21333: 错误:‘mysql_num_rows’在此作用域中尚未声明
sphinx.cpp:21341: 错误:‘m_pMysqlFields’在此作用域中尚未声明
sphinx.cpp: In member function ‘virtual bool CSphSource_MySQL::SqlQuery(const char*)’:
sphinx.cpp:21348: 错误:‘m_tMysqlDriver’在此作用域中尚未声明
sphinx.cpp:21348: 错误:‘mysql_query’在此作用域中尚未声明
sphinx.cpp:21357: 错误:‘m_pMysqlResult’在此作用域中尚未声明
sphinx.cpp:21357: 错误:‘m_tMysqlDriver’在此作用域中尚未声明
sphinx.cpp:21357: 错误:‘mysql_use_result’在此作用域中尚未声明
sphinx.cpp:21358: 错误:‘m_pMysqlFields’在此作用域中尚未声明
sphinx.cpp: In member function ‘virtual bool CSphSource_MySQL::SqlIsError()’:
sphinx.cpp:21365: 错误:‘m_tMysqlDriver’在此作用域中尚未声明
sphinx.cpp:21365: 错误:‘mysql_errno’在此作用域中尚未声明
sphinx.cpp: In member function ‘virtual const char* CSphSource_MySQL::SqlError()’:
sphinx.cpp:21371: 错误:‘m_tMysqlDriver’在此作用域中尚未声明
sphinx.cpp:21371: 错误:‘mysql_error’在此作用域中尚未声明
sphinx.cpp: In member function ‘virtual bool CSphSource_MySQL::SqlConnect()’:
sphinx.cpp:21377: 错误:‘m_tMysqlDriver’在此作用域中尚未声明
sphinx.cpp:21377: 错误:‘mysql_init’在此作用域中尚未声明
sphinx.cpp:21380: 错误:‘mysql_ssl_set’在此作用域中尚未声明
sphinx.cpp:21382: 错误:‘CLIENT_MULTI_RESULTS’在此作用域中尚未声明
sphinx.cpp:21385: 错误:‘mysql_real_connect’在此作用域中尚未声明
sphinx.cpp: In member function ‘virtual void CSphSource_MySQL::SqlDisconnect()’:
sphinx.cpp:21397: 错误:‘m_tMysqlDriver’在此作用域中尚未声明
sphinx.cpp:21397: 错误:‘mysql_close’在此作用域中尚未声明
sphinx.cpp: In member function ‘virtual int CSphSource_MySQL::SqlNumFields()’:
sphinx.cpp:21403: 错误:‘m_pMysqlResult’在此作用域中尚未声明
sphinx.cpp:21406: 错误:‘m_pMysqlResult’在此作用域中尚未声明
sphinx.cpp:21406: 错误:‘mysql_num_fields’在此作用域中尚未声明
sphinx.cpp: In member function ‘virtual bool CSphSource_MySQL::SqlFetchRow()’:
sphinx.cpp:21412: 错误:‘m_pMysqlResult’在此作用域中尚未声明
sphinx.cpp:21415: 错误:‘m_tMysqlRow’在此作用域中尚未声明
sphinx.cpp:21415: 错误:‘m_pMysqlResult’在此作用域中尚未声明
sphinx.cpp:21415: 错误:‘mysql_fetch_row’在此作用域中尚未声明
sphinx.cpp: In member function ‘virtual const char* CSphSource_MySQL::SqlColumn(int)’:
sphinx.cpp:21422: 错误:‘m_pMysqlResult’在此作用域中尚未声明
sphinx.cpp:21425: 错误:‘m_tMysqlRow’在此作用域中尚未声明
sphinx.cpp: In member function ‘virtual const char* CSphSource_MySQL::SqlFieldName(int)’:
sphinx.cpp:21431: 错误:‘m_pMysqlResult’在此作用域中尚未声明
sphinx.cpp:21434: 错误:‘m_pMysqlFields’在此作用域中尚未声明
sphinx.cpp:21435: 错误:‘m_pMysqlResult’在此作用域中尚未声明
sphinx.cpp:21435: 错误:‘mysql_fetch_fields’在此作用域中尚未声明
sphinx.cpp:21437: 错误:‘m_pMysqlFields’在此作用域中尚未声明
sphinx.cpp: In member function ‘virtual DWORD CSphSource_MySQL::SqlColumnLength(int)’:
sphinx.cpp:21443: 错误:‘m_pMysqlResult’在此作用域中尚未声明
sphinx.cpp:21447: 错误:‘m_pMysqlResult’在此作用域中尚未声明
sphinx.cpp:21447: 错误:‘mysql_fetch_lengths’在此作用域中尚未声明
make: *** 错误 1
make: Leaving directory `/data/xueba/coreseek-4.1-beta/csft-4.1/src'
make: *** 错误 2
make: Leaving directory `/data/xueba/coreseek-4.1-beta/csft-4.1/src'
make: *** 错误 1

y45871296 发表于 2014-6-3 08:52:18

find / -name mysql.h   
确实没有这个文件的

licess 发表于 2014-6-3 15:10:25

/usr/local/mysql/include/mysql.h
没有不大可能

y45871296 发表于 2014-6-5 21:05:31

确实没有

用yum install mysql-devel安装了管理的程序   解决了这个问题
页: [1]
查看完整版本: 程序需要用到mysql-devel 如何在lnmp编译后进行安装呢