Ø 解压并进入目录
tar xzvf sysbench-0.4.12.tar.gz cd sysbench-0.4.12
Ø 配置
./configure
Invalid configuration `x86_64-unknown-linux-':machine `x86_64-unknown-linux' not recognized
configure: error: /bin/sh config/config.subx86_64-unknown-linux- failed
Ø 重新配置
./configure --build=x86_64
configure: error: no acceptable C compiler foundin $PATH
Ø 安装C/C++编译器
sudo yum install gcc-c++
Ø 重新配置
./configure --build=x86_64
configure: error: mysql_config executable notfound
*******************************************************************************
ERROR: cannot find MySQL libraries. If you wantto compile with MySQL support,
youmust either specify file locations explicitly using
--with-mysql-includes and --with-mysql-libs options, or make sure pathto
mysql_config is listed in your PATH environment variable. If you want to
disable MySQL support, use --without-mysql option.
*******************************************************************************
Ø 安装MySQL头文件和库文件
sudo yum install MySQL-shared sudo yum install MySQL-devel
Ø 重新配置
./configure
Ø 编译
sudo make../libtool: line 838: X--tag=CC: command notfound
../libtool: line 871: libtool: ignoring unknowntag : command not found
../libtool: line 838: X--mode=link: command notfound
……
Ø 升级libtool
sudo yum install libtool
之后用新的libtoll替换sysbench目录中旧的libtool后重新编译
或者直接在sysbench目录下执行autogen.sh自动在该目录安装新的libtool
Ø 重新配置
sudo make clean ./configure
Ø 编译安装
make sudo make install
./autogen.sh ./configure make sudo make install
tar xzvf sysbench-0.4.12.tar.gz cd sysbench-0.4.12 sudo yum install gcc-c++ sudo yum install MySQL-shared sudo yum install MySQL-devel ./configure sudo yum install libtool(之后替换掉sysbench目录内的libtool) make sudo make install