日期:2014-05-16  浏览次数:20672 次

源码安装mysql可能遇到的问题及解决办法

本文用来解决从源码安装mysql时,通常在运行configure,make&&make install命令时可能碰到的问题及解决办法

问题一,报错如下:

configure: error: in `/Application/mysql-5.1.58':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.

?

解决办法:运行命令 yum install gcc

?

?

问题二,报错如下:

checking for tgetent in -lncursesw... no
checking for tgetent in -lncurses... no
checking for tgetent in -lcurses... no
checking for tgetent in -ltermcap... no
checking for tgetent in -ltinfo... no
checking for termcap functions library... configure: error: No curses/termcap library found

?

解决办法:

一、如果你的系统是RedHat系列:
yum list|grep ncurses
yum -y install ncurses-devel
yum install ncurses-devel


二、如果你的系统是Ubuntu或Debian:
apt-cache search ncurses
apt-get install libncurses5-dev

?

问题三,报错如下:

DEFAULT_SYSCONFDIR="\"/usr/local/mysql/etc\"" -DHAVE_CONFIG_H -I. -I../include -I../zlib -I../include -I../include -I.    -O    -fno-implicit-templates -fno-exceptions -fno-rtti -c -o my_new.o my_new.cc
../depcomp: line 571: exec: g++: not found
make[1]: *** [my_new.o] Error 127
make[1]: Leaving directory `/Application/mysql-5.1.58/mysys'

?

解决办法:运行命令: yum install -y gcc-c++ && yum install libstdc++-devel,并且重新运行configure 命令

?

?

参考文章:

http://blog.csdn.net/heyouqianqiu/article/details/4129544
http://blog.csdn.net/zccst/article/details/4493074