sysbench安装以及常见错误

1,环境要求:
mysql

     1,centos,gcc,gcc++c++

     若是没有安装gcc:错误提示:
sql

        configure: error: no acceptable C compiler found in $PATH,centos

yum -y install gcc
yum -y install gcc-c++ 
yum install make

    
       2,若是没有安装libtool,make的时候 会报以下错误:ui

            ./libtool: line 841: X--tag=CC: command not foundspa

            ../libtool: line 874: libtool: ignoring unknown tag : command not foundcode

            ../libtool: line 841: X--mode=link: command not foundci

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

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

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

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

            ../libtool: line 1954: X-L/usr/local/mysql/lib: No such file or directory

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

            yum install libtool  而后执行:cp /usr/bin/libtool /usr/local/sysbench-0.4.12/libtool

     3,没有安装make :command make not found  

         yum install make

     4,安装:

        ./configure --with-mysql-includes=/usr/local/mysql/include --with-mysql-libs=/usr/local/mysql/lib

     5,make && make install

     6,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 -V  安装成功

相关文章
相关标签/搜索