介紹一下關於mysql-5.5.28源碼安裝過程中幾大錯誤總結,希望此文章對各位同學有所幫助。
系統centOS 6.3 mini (沒有任何編譯環境)
預編譯環境首先裝了眾所周知的 cmake(yum install cmake -y)
復制代碼 代碼如下:
、./bootstrap Error when bootstrapping CMake: Cannot find appropriate C compiler on this system. Please specify one using environment variable CC. See cmake_bootstrap.log for compilers attempted.
好吧還是沒准備充分,發現c編譯程序沒裝,也就是GCC了,那就裝上(yum install gcc -y)
復制代碼 代碼如下:
CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found.
額,這個算是個人新遇見的錯誤了,到處查找資料,總算明白了,原來了還有一個c++的編譯程序沒裝,好吧(yum install gcc-c++ -y),然後發現已經生成CMakeCache.txt文件了。沒辦法,刪了(rm -rf CMakeCache.txt)繼續編譯!
復制代碼 代碼如下:
CMake Error at cmake/readline.cmake:82 (MESSAGE):
Curses library not found. Please install appropriate package,
remove CMakeCache.txt and rerun cmake.On Debian/Ubuntu, package name is libncurses5-dev, on Redhat and derivates it is ncurses-devel.
果斷的又懵了,不知道哪裡出了問題,猜是什麼包沒有裝吧,最後才看懂On Debian/Ubuntu, package name is libncurses5-dev, on Redhat and derivates it is ncurses-devel.這兩句,OK裝了ncurses-devel這個包(yum install ncurses-devel -y)
Warning: Bison executable not found in PATH
總算順利的配置成功了,提示一個警告,不能放過,一查是缺少Bison,簡單了(yum install bison -y)安裝解決!接著就make;make install啦!很幸運,順利完成!