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  安裝成功

相關文章
相關標籤/搜索