mysql安装遇到../depcomp: line 512: exec: g++: not found报错解决

    centos6.5,编译安装mysql5.1.27时遇到以下下错误,查看了一下系统没有安装gcc-c++,于是用yum安装,命令:yum install -y gcc-c++

 报错1:
../depcomp: line 512: exec: g++: not found
 make[2]: *** [my_new.o] Error 127
 make[2]: Leaving directory `/usr/local/src/mysql-5.0.41/mysys'
 make[1]: *** [all-recursive] Error 1
 make[1]: Leaving directory `/usr/local/src/mysql-5.0.41'
 make: *** [all] Error 2
 解决方法:yum install -y gcc-c++

安装完gcc-c++之后,直接编译make,继续报错,错误如下:

报错2:
../include/my_global.h:909: error: redeclaration of C++ built-in type `bool'make[2]: *** [my_new.o] Error 1make[2]: Leaving directory `/home/tools/mysql-5.0.22/mysys'make[1]: *** [all-recursive] Error 1make[1]: Leaving directory `/home/tools/mysql-5.0.22'make: *** [all] Error 2
解决方法:重新configure,然后编译安装

最后网上搜素发现,gcc-c++实在configure之后安装的,导致安装报错,于是重新configure,然后make,make install才安装成功

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章