尝试在我的 centos 系统上安装 asterisk按照本教程 但在做
./configure –libdir=/usr/lib64 && make menuselect && make && make install
app_mysql
在我的终端中选择后,menuselect
出现以下错误:
[CC] app_mysql.c -> app_mysql.o
app_mysql.c:35:25: error: mysql/mysql.h: No such file or directory
app_mysql.c: In function ‘mysql_ds_destroy’:
app_mysql.c:137: warning: implicit declaration of function ‘mysql_close’
app_mysql.c:140: warning: implicit declaration of function ‘mysql_free_result’
app_mysql.c: In function ‘aMYSQL_connect’:
app_mysql.c:322: error: ‘MYSQL’ undeclared (first use in this function)
app_mysql.c:322: error: (Each undeclared identifier is reported only once
app_mysql.c:322: error: for each function it appears in.)
app_mysql.c:322: error: ‘mysql’ undeclared (first use in this function)
app_mysql.c:335: warning: implicit declaration of function ‘mysql_init’
app_mysql.c:342: warning: implicit declaration of function ‘mysql_options’
app_mysql.c:342: error: ‘MYSQL_OPT_CONNECT_TIMEOUT’ undeclared (first use in this function)
app_mysql.c:348: warning: implicit declaration of function ‘mysql_real_escape_string’
app_mysql.c:349: error: ‘MYSQL_INIT_COMMAND’ undeclared (first use in this function)
app_mysql.c:350: error: ‘MYSQL_SET_CHARSET_NAME’ undeclared (first use in this function)
app_mysql.c:361: warning: implicit declaration of function ‘mysql_real_connect’
app_mysql.c:371: warning: implicit declaration of function ‘mysql_errno’
app_mysql.c:371: warning: implicit declaration of function ‘mysql_error’
app_mysql.c: In function ‘aMYSQL_query’:
app_mysql.c:387: error: ‘MYSQL’ undeclared (first use in this function)
app_mysql.c:387: error: ‘mysql’ undeclared (first use in this function)
app_mysql.c:388: error: ‘MYSQL_RES’ undeclared (first use in this function)
app_mysql.c:388: error: ‘mysqlres’ undeclared (first use in this function)
app_mysql.c:404: warning: implicit declaration of function ‘mysql_query’
app_mysql.c:409: warning: implicit declaration of function ‘mysql_store_result’
app_mysql.c:412: warning: implicit declaration of function ‘mysql_field_count’
app_mysql.c: In function ‘aMYSQL_nextresult’:
app_mysql.c:422: error: ‘MYSQL’ undeclared (first use in this function)
app_mysql.c:422: error: ‘mysql’ undeclared (first use in this function)
app_mysql.c:423: error: ‘MYSQL_RES’ undeclared (first use in this function)
app_mysql.c:423: error: ‘mysqlres’ undeclared (first use in this function)
app_mysql.c:444: warning: implicit declaration of function ‘mysql_more_results’
app_mysql.c:445: warning: implicit declaration of function ‘mysql_next_result’
app_mysql.c: In function ‘aMYSQL_fetch’:
app_mysql.c:462: error: ‘MYSQL_RES’ undeclared (first use in this function)
app_mysql.c:462: error: ‘mysqlres’ undeclared (first use in this function)
app_mysql.c:463: error: ‘MYSQL_ROW’ undeclared (first use in this function)
app_mysql.c:463: error: expected ‘;’ before ‘mysqlrow’
app_mysql.c:480: error: ‘mysqlrow’ undeclared (first use in this function)
app_mysql.c:480: warning: implicit declaration of function ‘mysql_fetch_row’
app_mysql.c:481: warning: implicit declaration of function ‘mysql_num_fields’
app_mysql.c: In function ‘aMYSQL_clear’:
app_mysql.c:514: error: ‘MYSQL_RES’ undeclared (first use in this function)
app_mysql.c:514: error: ‘mysqlres’ undeclared (first use in this function)
app_mysql.c: In function ‘aMYSQL_disconnect’:
app_mysql.c:531: error: ‘MYSQL’ undeclared (first use in this function)
app_mysql.c:531: error: ‘mysql’ undeclared (first use in this function)
make[1]: *** [app_mysql.o] Error 1
make: *** [addons] Error 2
并继续做
yum install mysql-devel
(解决方案来自这里)它给出一个错误:
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: mirror.nbrc.ac.in
* epel: epel.mirror.net.in
* extras: mirror.nbrc.ac.in
* updates: mirror.nbrc.ac.in
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mysql-devel.x86_64 0:5.1.73-3.el6_5 will be installed
--> Processing Dependency: mysql = 5.1.73-3.el6_5 for package: mysql-devel-5.1.73-3.el6_5.x86_64
--> Finished Dependency Resolution
Error: Package: mysql-devel-5.1.73-3.el6_5.x86_64 (updates)
Requires: mysql = 5.1.73-3.el6_5
Installed: mysql-5.5.38-1.el6.remi.x86_64 (@remi)
mysql = 5.5.38-1.el6.remi
Available: mysql-5.1.71-1.el6.x86_64 (base)
mysql = 5.1.71-1.el6
Available: mysql-5.1.73-3.el6_5.x86_64 (updates)
mysql = 5.1.73-3.el6_5
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodige
我已经完成了之前的所有步骤。我还安装了 mysql 数据库。
我是否遗漏了什么?
答案1
您需要安装 mysql-devel
由于您有 mysql-5.5,因此您需要找到该版本的 devel 或从源代码重新安装它。
您可以尝试谷歌搜索或类似的东西
http://rpm.pbone.net/index.php3/stat/3/srodzaj/1/search/mysql-devel%28x86-64%29