当前位置: 首页 >> 榆树网-系统 >> 文章正文

FreeBSD Ports变化带来的一点小麻烦

平常使用Linux比较多,为熟悉和了解FreeBSD,在虚拟机下安装了一个FreeBSD,为了了解FreeBSD的升级功能,特意安装7.2版本,通过网络升级,升级到8.0版本。

因为是测试的,所以port里面的软件都是安装最新的,自然MySQL就是用6.0了。但是最近通过csup更新ports tree之后发现部分软件无法升级,提示找不到mysql60-client。

经过核对,在ports里面的databases里面果真mysql60-client和mysql60-server果真不存在了,google之后发现:

DEPRECATED: The MySQL 6.0  development branch is deprecated and will be removed soon.  Please  consider using MySQL 5.5 instead.

http://www.freshports.org/databases/mysql60-client/

没办法,只能换回5.5啦,为了删除MySQL6.0,被迫一起删除相依赖的一些软件,如php5-mysqli扩展。

经过漫长的编译后,终于轮到重新安装php扩展了,但是却发现这样的提示:

/usr/ports/databases/php5-mysqli/work/php-5.2.12/ext/mysqli/mysqli.c:  In function 'zm_startup_mysqli':
/usr/ports/databases/php5-mysqli/work/php-5.2.12/ext/mysqli/mysqli.c:637:  error: 'MYSQL_RPL_MASTER' undeclared (first use in this function)
/usr/ports/databases/php5-mysqli/work/php-5.2.12/ext/mysqli/mysqli.c:637:  error: (Each undeclared identifier is reported only once
/usr/ports/databases/php5-mysqli/work/php-5.2.12/ext/mysqli/mysqli.c:637:  error: for each function it appears in.)
/usr/ports/databases/php5-mysqli/work/php-5.2.12/ext/mysqli/mysqli.c:638:  error: 'MYSQL_RPL_SLAVE' undeclared (first use in this function)
/usr/ports/databases/php5-mysqli/work/php-5.2.12/ext/mysqli/mysqli.c:639:  error: 'MYSQL_RPL_ADMIN' undeclared (first use in this function)

没办法,只能继续Google,原来解决办法是这样的:

cd /usr/local/include/mysql
 toor@com[/usr/local/include/mysql]  ee mysql.h
 ... ...
enum mysql_protocol_type
 {
 MYSQL_PROTOCOL_DEFAULT, MYSQL_PROTOCOL_TCP, MYSQL_PROTOCOL_SOCKET,
 MYSQL_PROTOCOL_PIPE, MYSQL_PROTOCOL_MEMORY
 };
 /*
 There are three types of queries - the ones  that have to go to
 the master, the ones that go to a slave, and the adminstrative
 type which must happen on the pivot connectioin
 */
 enum mysql_rpl_type
 {
 MYSQL_RPL_MASTER, MYSQL_RPL_SLAVE, MYSQL_RPL_ADMIN
 };

 typedef struct character_set
 {
 unsigned int      number;     /* character set number              */
 unsigned int      state;      /* character set state               */
 const char        *csname;    /* collation name                    */
 const char        *name;      /* character set name                */
 ... ...

From: http://www.freebsdchina.org/forum/viewtopic.php?p=245925&sid=0b6d25bb6d25f99101276165fc707e4d

看来用哪个系统都会遇到一些苦恼的事情啊

相关文章

发表评论