Installation error MySQL on Asterisk 10.0.0 beta1


#1

Hello,
I am trying to install the latest version of Asterisk 10.0.0 beta 1 and getting the following errors of mysql
I select the app_mysql from the menuselect before making.

[color=#0000FF]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:333: warning: implicit declaration of function ‘mysql_init’
app_mysql.c:340: warning: implicit declaration of function ‘mysql_options’
app_mysql.c:340: error: ‘MYSQL_OPT_CONNECT_TIMEOUT’ undeclared (first use in this function)
app_mysql.c:346: warning: implicit declaration of function ‘mysql_real_escape_string’
app_mysql.c:347: error: ‘MYSQL_INIT_COMMAND’ undeclared (first use in this function)
app_mysql.c:348: error: ‘MYSQL_SET_CHARSET_NAME’ undeclared (first use in this function)
app_mysql.c:351: warning: implicit declaration of function ‘mysql_real_connect’
app_mysql.c:361: warning: implicit declaration of function ‘mysql_errno’
app_mysql.c:361: warning: implicit declaration of function ‘mysql_error’
app_mysql.c:361: warning: format ‘%s’ expects type ‘char *’, but argument 10 has type ‘int’
app_mysql.c: In function ‘aMYSQL_query’:
app_mysql.c:377: error: ‘MYSQL’ undeclared (first use in this function)
app_mysql.c:377: error: ‘mysql’ undeclared (first use in this function)
app_mysql.c:378: error: ‘MYSQL_RES’ undeclared (first use in this function)
app_mysql.c:378: error: ‘mysqlres’ undeclared (first use in this function)
app_mysql.c:394: warning: implicit declaration of function ‘mysql_query’
app_mysql.c:395: warning: format ‘%s’ expects type ‘char *’, but argument 6 has type ‘int’
app_mysql.c:399: warning: implicit declaration of function ‘mysql_store_result’
app_mysql.c:402: warning: implicit declaration of function ‘mysql_field_count’
app_mysql.c: In function ‘aMYSQL_nextresult’:
app_mysql.c:412: error: ‘MYSQL’ undeclared (first use in this function)
app_mysql.c:412: error: ‘mysql’ undeclared (first use in this function)
app_mysql.c:413: error: ‘MYSQL_RES’ undeclared (first use in this function)
app_mysql.c:413: error: ‘mysqlres’ undeclared (first use in this function)
app_mysql.c:434: warning: implicit declaration of function ‘mysql_more_results’
app_mysql.c:435: warning: implicit declaration of function ‘mysql_next_result’
app_mysql.c: In function ‘aMYSQL_fetch’:
app_mysql.c:452: error: ‘MYSQL_RES’ undeclared (first use in this function)
app_mysql.c:452: error: ‘mysqlres’ undeclared (first use in this function)
app_mysql.c:453: error: ‘MYSQL_ROW’ undeclared (first use in this function)
app_mysql.c:453: error: expected ‘;’ before ‘mysqlrow’
app_mysql.c:470: error: ‘mysqlrow’ undeclared (first use in this function)
app_mysql.c:470: warning: implicit declaration of function ‘mysql_fetch_row’
app_mysql.c:471: warning: implicit declaration of function ‘mysql_num_fields’
app_mysql.c: In function ‘aMYSQL_clear’:
app_mysql.c:504: error: ‘MYSQL_RES’ undeclared (first use in this function)
app_mysql.c:504: error: ‘mysqlres’ undeclared (first use in this function)
app_mysql.c: In function ‘aMYSQL_disconnect’:
app_mysql.c:521: error: ‘MYSQL’ undeclared (first use in this function)
app_mysql.c:521: error: ‘mysql’ undeclared (first use in this function)
make[1]: *** [app_mysql.o] Error 1
make: *** [addons] Error 2[/color]

please suggest


#2

You haven’t installed the required dependencies, if you look at the first line of your errors (“mysql/mysql.h”). You should install the libmysqlclient-dev package (debian or Ubuntu)


#3

Thanks dude…its solved now by installing the same package.