您的位置:首页 > 其它

哎,就硬盘还不是最掉价的,1999的自配主机,VIRTUALBOX里虚拟机,聊以自慰吧。

2014-03-09 10:05 330 查看
安装时注意的问题,要是不测试MYSQL,则CONFIGURE参数和DISABLE-MYSQL,在编译时有提示的。

然后就是LIBTOOL包过老的问题,以及未安装LIBTOOL包的问题。

最后,是运行命令时的参数问题。

~~~~~~~~~~~~~

安装sysbench0.4.12,在执行make命名中,出现了如下的报错:

Bash代码







/bin/sh ../libtool --tag=CC --mode=link gcc -pthread -g -O2 -o sysbench sysbench.o sb_timer.o sb_options.o sb_logger.o db_driver.o tests/fileio/libsbfileio.a tests/threads/libsbthreads.a tests/memory/libsbmemory.a tests/cpu/libsbcpu.a tests/oltp/libsboltp.a tests/mutex/libsbmutex.a drivers/mysql/libsbmysql.a -L/usr/mysql/lib -lmysqlclient_r -lpthread -lz -lm -lrt -ldl -lrt -laio -lm

../libtool: line 838: X--tag=CC: command not found

../libtool: line 871: libtool: ignoring unknown tag : command not found

../libtool: line 838: X--mode=link: command not found

../libtool: line 1004: *** Warning: inferring the mode of operation is deprecated.: command not found

../libtool: line 1005: *** Future versions of Libtool will require --mode=MODE be specified.: command not found

../libtool: line 2231: X-g: command not found

../libtool: line 2231: X-O2: command not found

../libtool: line 1951: X-L/u01/mysql/lib: No such file or directory

../libtool: line 2400: Xsysbench: command not found

/bin/sh ../libtool --tag=CC   --mode=link gcc -pthread -g -O2      -o sysbench sysbench.o sb_timer.o sb_options.o sb_logger.o db_driver.o tests/fileio/libsbfileio.a tests/threads/libsbthreads.a tests/memory/libsbmemory.a tests/cpu/libsbcpu.a tests/oltp/libsboltp.a tests/mutex/libsbmutex.a drivers/mysql/libsbmysql.a -L/usr/mysql/lib -lmysqlclient_r -lpthread -lz -lm -lrt -ldl   -lrt -laio -lm
../libtool: line 838: X--tag=CC: command not found
../libtool: line 871: libtool: ignoring unknown tag : command not found
../libtool: line 838: X--mode=link: command not found
../libtool: line 1004: *** Warning: inferring the mode of operation is deprecated.: command not found
../libtool: line 1005: *** Future versions of Libtool will require --mode=MODE be specified.: command not found
../libtool: line 2231: X-g: command not found
../libtool: line 2231: X-O2: command not found
../libtool: line 1951: X-L/u01/mysql/lib: No such file or directory
../libtool: line 2400: Xsysbench: command not found


这个错误的原因是sysbench源代码中自带的libtool版本太旧了,可以使用系统的libtool替代之,在sysbench的源代码根目录下执行如下的命令即可:

Bash代码







cp /usr/bin/libtool libtool

cp /usr/bin/libtool libtool


第二个问题是安装完sysbench之后执行时报错:

Bash代码







./sysbench: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory

./sysbench: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory


这说明sysbench无法找到mysql的库文件,这很可能是环境变量LD_LIBRARY_PATH没有设置,设置后即可解决该问题:

Bash代码







export LD_LIBRARY_PATH=/usr/mysql/lib

export LD_LIBRARY_PATH=/usr/mysql/lib






内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: