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才安裝成功

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