安裝 gearmand 前先裝一堆依賴,以下:mysql
(boost的版本須要大於 1.39)web
yum install boost-devel sql
yum install mysql-develui
yum install gperfgoogle
yum install libeventspa
yum install libevent-develit
yum install libuuid-develio
安裝好依賴後,執行 ./configure,而後 make 遇到了個困擾我半天的坑,報錯event
/usr/bin/ld: bin/gearadmin: undefined reference to symbol '__pthread_key_create@@GLIBC_2.2.5'thread
/usr/bin/ld: note: '__pthread_key_create@@GLIBC_2.2.5' is defined in DSO /lib64/libpthread.so.0 so tr
/lib64/libpthread.so.0: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[1]: *** [bin/gearadmin] Error 1
make[1]: Leaving directory `/home/web_tar/gearmand-1.1.12'
make: *** [all] Error 2
google看了下,這是個比較通用的解決方法,打開 ./Makefile,
把
LDFLAGS = -L/usr/lib64/mysql/
改成
LDFLAGS = -L/usr/lib64/mysql/ -lpthread
再 make 就OK了。