雲端服務器 安裝sysbench報錯./libtool: line 841: X--tag=CC: command not found,sysbenchlibtool

來源:互聯網
上載者:User

雲端服務器 安裝sysbench報錯./libtool: line 841: X--tag=CC: command not found,sysbenchlibtool

重點內容背景,安裝sysbench編譯make報錯:

./libtool: line 841: X--tag=CC: command not found../libtool: line 874: libtool: ignoring unknown tag : command not found../libtool: line 841: X--mode=link: command not found../libtool: line 1007: *** Warning: inferring the mode of operation is deprecated.: command not found../libtool: line 1008: *** Future versions of Libtool will require --mode=MODE be specified.: command not found../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../libtool: line 2408: X: command not found../libtool: line 2415: Xsysbench: command not found../libtool: line 2550: X-lmysqlclient_r: command not found../libtool: line 2550: X-lrt: command not found../libtool: line 2550: X-lm: command not found../libtool: line 2632: X-L/data/sysbench-0.4.12/sysbench: No such file or directory../libtool: line 2550: X-lmysqlclient_r: command not found../libtool: line 2550: X-lrt: command not found../libtool: line 2550: X-lm: command not found../libtool: line 2632: X-L/data/sysbench-0.4.12/sysbench: No such file or directory../libtool: line 2550: X-lmysqlclient_r: command not found../libtool: line 2550: X-lrt: command not found../libtool: line 2550: X-lm: command not found
1,可能原因:

(1)、沒裝依賴包libtool
(2)、安裝的版本不對(libtool版本過舊)
(3)、其它原因

<著作權,文章允許轉載,但必須以連結方式註明源地址,否則追究法律責任!>
原部落格地址: http://blog.csdn.net/mchdba/article/details/46381741
原作者:黃杉 (mchdba)

2,解決方案:

安裝依賴包libtool、libtoo更新到新版本、用autoreconf代替autogen.sh,方法如下:

這裡採用最後一種種辦法:

autoreconf -iconfiguremakemake install
3,然後configure就正常通過
[root@bizdb01 sysbench-0.4.12]# sysbench --helpsysbench: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory[root@bizdb01 sysbench-0.4.12]# 
4,報lib報錯
[root@bizdb01 sysbench-0.4.12]# find / -name libmysqlclient.so.18/mnt/resource/mysql-5.6.12/libmysql/libmysqlclient.so.18/usr/local/mysql/lib/libmysqlclient.so.18[root@bizdb01 sysbench-0.4.12]# 

這說明sysbench無法找到mysql的庫檔案,這很可能是環境變數LD_LIBRARY_PATH沒有設定,設定後即可解決該問題:

echo "export LD_LIBRARY_PATH=/usr/local/mysql/lib" >> /etc/profile/source /etc/profile/[root@bizdb01 sysbench-0.4.12]# echo "export LD_LIBRARY_PATH=/usr/local/mysql/lib" >> /etc/profile[root@bizdb01 sysbench-0.4.12]# source /etc/profile[root@bizdb01 sysbench-0.4.12]# [root@bizdb01 sysbench-0.4.12]# [root@bizdb01 sysbench-0.4.12]# sysbench --helpUsage:  sysbench [general-options]... --test=<test-name> [test-options]... commandGeneral options:  --num-threads=N            number of threads to use [1]  --max-requests=N           limit for total number of requests [10000]  --max-time=N               limit for total execution time in seconds [0]  --forced-shutdown=STRING   amount of time to wait after --max-time before forcing shutdown [off]  --thread-stack-size=SIZE   size of stack per thread [32K]  --init-rng=[on|off]        initialize random number generator [off]  --test=STRING              test to run  --debug=[on|off]           print more debugging info [off]  --validate=[on|off]        perform validation checks where possible [off]  --help=[on|off]            print help and exit  --version=[on|off]         print version and exitCompiled-in tests:  fileio - File I/O test  cpu - CPU performance test  memory - Memory functions speed test  threads - Threads subsystem performance test  mutex - Mutex performance test  oltp - OLTP testCommands: prepare run cleanup help versionSee 'sysbench --test=<name> help' for a list of options for each test.

[root@bizdb01 sysbench-0.4.12]#

     min:                                  0.01ms     avg:                                  3.40ms     max:                                 99.25ms     approx.  95 percentile:              19.00ms

Read 93.703Mb Written 62.688Mb Total transferred 156.39Mb (23.951Mb/sec)

5,接下來可以使用sysbench對伺服器進行壓力測試
 time sysbench --test=oltp --oltp-test-mode=nontrx --mysql-table-engine=innodb  --mysql-user=root  --mysql-password=""  --db-driver=mysql --num-threads=1000 --max-requests=100000  --oltp-nontrx-mode=select --mysql-db=test  --oltp-table-size=1000000 --oltp-table-name=t1  --mysql-socket=/usr/local/mysql/mysql.sock prepare

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.