Sysbench安装流程与报错

sysbench安装流程与报错

解压

下载页面https://github.com/akopytov/sysbench/releases/tag/1.0.14

tar -zxvf sysbench-1.0.14.tar.gz

安装

  • 打开安装包
cd sysbench-1.0.14
  • 自动安装脚本
./autogen.ch
  • 安装配置环境检查
./configure --with-mysql-includes=/usr/local/mysql/include --with-mysql-libs=/usr/local/mysql/lib
  • 安装
make && make install
  • 可能出现的错误
sysbench: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory

cd /usr/local/mysql/lib 查看是否有libmysqlclient.so.18

cd /usr/lib/ 查看是否有libmysqlclient.so.18

/usr/lib/ 中没有libmysqlclient.so.18 则做软链接

ln -s /usr/local/mysql/lib/libmysqlclient.so.18 /usr/lib

执行:sysbench –version 安装成功