CentOS 5 預設使用 NPTL 執行緒庫,但 MySQL 4.0.27 需要 LinuxThreads,直接編譯會報錯。本文記錄完整排解流程。
checking "LinuxThreads"... "Not found"
echo '/* Linuxthreads */' >> /usr/include/pthread.h
編譯時加入參數:
./configure --with-pthread --with-named-thread-libs=-lpthread
configure: error: No curses/termcap library found
yum install ncurses-devel
cannot find -lreadline
yum install readline-devel
./configure --with-pthread --with-named-thread-libs=-lpthread
make && make install
gcc、gcc-c++、make 等建構工具。