httpsqs学习笔记(2)

阅读更多
在centos上安装tokyocabinet-1.4.47,报错:
LD_RUN_PATH=/lib:/usr/lib:/usr/local/tokyocabinet-1.4.47/lib:/root/lib:/usr/local/lib:/usr/local/tokyocabinet-1.4.47/lib:. gcc -g -O2 -std=c99 -Wall -fPIC -fsigned-char -O2 -o tcutest tcutest.o -L. -L/usr/local/tokyocabinet-1.4.47/lib -L/root/lib -L/usr/local/lib  -ltokyocabinet -lz -lrt -lpthread -lm -lc
./libtokyocabinet.so: undefined reference to `BZ2_bzCompressInit'
./libtokyocabinet.so: undefined reference to `BZ2_bzCompress'
./libtokyocabinet.so: undefined reference to `BZ2_bzDecompress'
./libtokyocabinet.so: undefined reference to `BZ2_bzDecompressEnd'
./libtokyocabinet.so: undefined reference to `BZ2_bzDecompressInit'
./libtokyocabinet.so: undefined reference to `BZ2_bzCompressEnd'
collect2: ld 返回 1
make: *** [tcutest] 错误 1

解决方法:
/configure --help
./configure --with-bzip=BZIP_PATH
./configure --with-bzip=DIR/include;DIR/lib
./configure --disable-bzip

wget http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz
tar -zxvf bzip2-1.0.6.tar.gz
cd bzip2-1.0.6
make
make install prefix=/usr/local

./configure --enable-off64 --prefix=/usr/local/tokyocabinet-1.4.47 --with-bzip=/usr/local/include;/usr/local/lib
make
make install

你可能感兴趣的:(tokyocabinet,centos)