在configure的时候参数如下:
[root@localhost sysbench-0.4.12]# ./configure –prefix=/usr/local/sysbench –with-mysql-includes=/usr/local/mysql/include/ –with-mysql-libs=/usr/local/mysql/lib/
应该没有问题的,可是在make &&make install的时候出现下面错误
make[2]: Entering directory `/usr/local/src/sysbench-0.4.12/sysbench’
make[3]: Entering directory `/usr/local/src/sysbench-0.4.12/sysbench’
test -z “/usr/local/sysbench/bin” || mkdir -p — “/usr/local/sysbench/bin”
/bin/sh ../libtool –mode=install /usr/bin/install -c ‘sysbench’ ‘/usr/local/sysbench/bin/sysbench’
/usr/bin/install -c sysbench /usr/local/sysbench/bin/sysbench
make[3]: Nothing to be done for `install-data-am’.
make[3]: Leaving directory `/usr/local/src/sysbench-0.4.12/sysbench’
make[2]: Leaving directory `/usr/local/src/sysbench-0.4.12/sysbench’
make[1]: Leaving directory `/usr/local/src/sysbench-0.4.12/sysbench’
make[1]: Entering directory `/usr/local/src/sysbench-0.4.12′
make[2]: Entering directory `/usr/local/src/sysbench-0.4.12′
make[2]: Nothing to be done for `install-exec-am’.
make[2]: Nothing to be done for `install-data-am’.
make[2]: Leaving directory `/usr/local/src/sysbench-0.4.12′
make[1]: Leaving directory `/usr/local/src/sysbench-0.4.12′
[root@localhost sysbench-0.4.12]#
在网上搜索可能是没有安装或者少安装了libtool这个工具,我一查少一个
[root@localhost sysbench-0.4.12]# rpm -qa | grep libtool
libtool-ltdl-1.5.22-6.1
[root@localhost club.zhazh.com]# rpm -ivh libtool-ltdl-devel-1.5.22-6.1.x86_64.rpm
warning: libtool-ltdl-devel-1.5.22-6.1.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing… ########################################### [100%]
1:libtool-ltdl-devel ########################################### [100%]
[root@localhost club.zhazh.com]# ls
只有这一个,没有开发包呀!我连又安装一个开发包工具。哎。没有问题了
[root@localhost bin]# rpm -qa | grep libtool
libtool-ltdl-devel-1.5.22-6.1
libtool-ltdl-1.5.22-6.1
[root@localhost bin]#
问题解决,
无法找到MySQL的解决办法
使用问题
[root@l-hoteldb1.h.cn2 /tmp]# sysbench
sysbench: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory
[root@l-hoteldb1.h.cn2 /tmp]# ln -s /home/q/mysql_3306/lib/libmysqlclient.so.18 /usr/lib64/
--转自