Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2838928
  • 博文数量: 710
  • 博客积分: 8199
  • 博客等级: 中将
  • 技术积分: 10264
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-25 20:19
个人简介

脚踏实地、勇往直前!

文章分类

全部博文(710)

文章存档

2018年(58)

2017年(75)

2016年(48)

2015年(48)

2014年(152)

2013年(49)

2012年(157)

2011年(93)

2010年(30)

分类: Mysql/postgreSQL

2018-04-28 11:22:53


1.解压
[root@pxc01 soft]# tar -xvf sysbench-0.4.12.14.tar.gz
[root@pxc01 soft]# cd sysbench-0.4.12.14

2.运行autogen.sh
[root@pxc01 sysbench-0.4.12.14]#./autogen.sh
automake 1.10.x (aclocal) wasn't found, exiting
解决办法:
[root@pxc01 sysbench-0.4.12.14]# yum install automake


[root@pxc01 sysbench-0.4.12.14]# ./autogen.sh
libtoolize 1.4+ wasn't found, exiting
解决办法:
[root@pxc01 sysbench-0.4.12.14]# yum install libtool


[root@pxc01 sysbench-0.4.12.14]# ./autogen.sh
./autogen.sh: running `libtoolize --copy --force' 
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `config'.
libtoolize: copying file `config/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
./autogen.sh: running `aclocal -I m4' 
./autogen.sh: running `autoheader' 
./autogen.sh: running `automake -c --foreign --add-missing' 
./autogen.sh: running `autoconf' 
configure.ac:49: error: possibly undefined macro: AC_LIB_PREFIX
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
Can't execute autoconf


解决办法:
修改configure.ac文件,将AC_LIB_PREFIX函数注释掉
[root@pxc01 sysbench-0.4.12.14]# cat configure.ac | grep AC_LIB_PREFIX
#AC_LIB_PREFIX()


4.编译安装
[root@pxc01 sysbench-0.4.12.14]# ./configure && make && make install
configure: error: mysql_config executable not found
********************************************************************************
ERROR: cannot find MySQL libraries. If you want to compile with MySQL support,
       you must either specify file locations explicitly using
       --with-mysql-includes and --with-mysql-libs options, or make sure path to
       mysql_config is listed in your PATH environment variable. If you want to
       disable MySQL support, use --without-mysql option.
********************************************************************************


解决办法:
yum -y install MySQL-shared
yum -y install MySQL-devel
或者自定义安装了mysql的话,修改安装用户(root)的环境变量


[root@pxc01 ~]# more .bash_profile
# .bash_profile


# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs
MYSQL_HOME=/opt/mysql5721

PATH=$MYSQL_HOME/bin:$PATH:$HOME/bin

5.查看版本信息
[root@pxc01 sysbench-0.4.12.14]# sysbench --version
sysbench: error while loading shared libraries: libmysqlclient.so.20: cannot open shared object file: No such file or directory


解决办法:
在root环境变量中添加:
export LD_LIBRARY_PATH=$MYSQL_HOME/lib:$LD_LIBRARY_PATH:/usr/local/lib
[root@pxc01 ~]# sysbench --version
sysbench 0.4.12.10
[root@pxc01 ~]# 

-- The End --
阅读(18) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~
评论热议
请登录后评论。

登录 注册