最小安裝環境無編譯工具鏈,逐步解決依賴缺失。
| 錯誤現象 | 原因 | 解決命令 |
|---|---|---|
Cannot find appropriate C compiler | 缺 GCC | yum install gcc -y |
CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" | 缺 G++ | yum install gcc-c++ -y |
Curses library not found | 缺 ncurses-devel | yum install ncurses-devel -y |
Warning: Bison executable not found | 缺 Bison | yum install bison -y |
CMakeCache.txt 重新 cmake**cmake 參數建議指定安裝路徑:-DCMAKE_INSTALL_PREFIX=/usr/local/mysqlmake && make installyum install -y cmake gcc gcc-c++ ncurses-devel bison
裝齊後再 cmake 通常能一把過。
/usr/local/mysql/bin/mysql --version
# 輸出類似:mysql Ver 14.14 Distrib 5.5.28, for Linux (x86_64)