MySQL編譯報錯問題

今天在安裝MySQL時,由於初始Linux默認選擇安裝的包不過,在執行./configure命令報出如下錯誤:
./configure –prefix=/usr/local/mysql –with-charset=utf8 –with-collation=utf8_general_ci –with-extra-charsets=gb2312
–with-plugins=innobase,innodb_plugin,myisam,heap,csv,federated,blackhole –enable-local-infile –enable-thread-safe-client

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
錯誤原因為缺少ncurses安裝包,可以通過下載安裝相應的軟件包ncurses-devel來解決:
yum install ncurses-devel
另一個錯誤:
g++: not found
../depcomp: line 571: exec: g++: not found
make[1]: *** [my_new.o] Error 127
make[1]: Leaving directory `/opt/src/mysql-5.1.56/mysys'
make: *** [all-recursive] Error 1
錯誤原因是缺少G++編譯器,可以通過掛載原來的系統盤,找到相應的套件來解決:
gcc-4.1.2-46.el5.x86_64.rpm
gcc-c++-4.1.2-46.el5.x86_64.rpm
在安裝時可能提示有其他的依賴包要提前安裝,根據提示均可在原來的系統盤中找到。

You May Also Like