欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

httpsqs学习笔记(2) 博客分类: http tokyocabinetcentos 

程序员文章站 2024-03-23 15:41:58
...
在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