云服务器 安装sysbench报错./libtool: line 841: X--tag=CC: command not found

重点内容背景,安装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 -i
configure
make
make install

3,然后configure就正常通过

[[email protected] sysbench-0.4.12]# sysbench --help
sysbench: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory
[[email protected] 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 --help
Usage:
  sysbench [general-options]... --test=<test-name> [test-options]... command

General 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 exit

Compiled-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 test

Commands: prepare run cleanup help version

See ‘sysbench --test=<name> help‘ for a list of options for each test.

[[email protected] 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
时间: 2024-10-09 10:07:59

云服务器 安装sysbench报错./libtool: line 841: X--tag=CC: command not found的相关文章

云服务器503_云服务器访问503报错

原来运行正常的站点,突然不正常了,用iis7服务器监控工具检测出现503错误.查看操作系统的日志查看器显示: 由于配置问题,无法加载模块 DLL"C:\Program Files (x86)\IIS\Asp.Net Core Module\V2\aspnetcorev2.dll".当前配置仅支持加载为 x86 处理器架构构建的映像.数据字段包含错误号.要了解有关此问题的更多信息,包括如何解决这类处理器架构不匹配错误,请参见 http://go.microsoft.com/fwlink/

安装nghttp2 报错error: Libtool library used but &#39;LIBTOOL&#39; is undefined

nghttp2 报错error: Libtool library used but 'LIBTOOL' is undefined 如果重新安装libtool和autoconf升级到2.69后,还是报错, 则进行下面的操作: 1,查看aclocal的路径 aclocal --print-ac-dir 显示/usr/local/share/libtool/m4 ls看看里面没有m4文件. 则copy /usr/share/libtool/m4里面的m4文件到此目录下. 2,cd到nghtt2目录 执

在WSL中安装swool报错 error: unrecognized command line option &#39;-V&#39; 的解决方法

Windows Subsystem for Linux Ubuntu中使用pecl安装swool时遇到错误"error: C compiler cannot create executables"."error: unrecognized command line option '-V'" 解决方法 先看解决方法, 将gcc版本降低到4.8即可,因为高版本gcc取消了-V参数: sudo apt install gcc-4.8 -y sudo update-alte

腾讯云二进制包安装mysql报错及其解决方法

报错及其解决方法:-bash:mysql: command not found [[email protected] mysql]# ./scripts/mysql_install_db   --user=mysql --datadir=/mydata/data Installing MySQL system tables... ./bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared 

azure云迁移后expdp报错ORA-01110: data file 201: &#39;/home/oradata/powerdes/temp01.dbf&#39;

1,expdp的时候报错: 在idc的oracle服务器上正常导入导出都ok的,但是到了azure云上就出故障了: [[email protected] oracle]$ expdp \'powerdesk/testcrmfile\' directory=DIR_DUMP tables=bis_floor,bis_shop,bis_shop_conn,bis_store,bis_cont dumpfile=zhengyin.qu_bak_$(date +%Y%m%d)_02.dmp Export

Djianggo 在windows中安装出现报错的解决方案

Djianggo 在win7下 安装会报错 Traceback (most recent call last):File "setup.py", line 4, in <module> from setuptools import setup, find_packagesImportError: No module named setuptools 需要到  https://pypi.python.org/pypi/setuptools/ 上下载  setuptools-1

linux下安装php报错configure: error: Cannot find MySQL header files under /usr/include/mysql.

linux下安装php报错configure: error: Cannot find MySQL header files under /usr/include/mysql. 2013-03-04 15:34wdjhz | 分类:服务器软件 | 浏览5318次 configure: error: Cannot find MySQL header files under /usr/include/mysql.Note that the MySQL client library is not bun

安装mysql_sniffer报错undefined reference to symbol &#39;[email&#160;protected]@GLIBC_2.2.5&#39;问题

按照https://github.com/Qihoo360/mysql-sniffer上的安装方法进行安装,make是报错如下 Linking CXX executable mysql-sniffer /usr/bin/ld: /root/mysql-sniffer/lib/libgthread-2.0.a(gthread-impl.o): undefined reference to symbol '[email protected]@GLIBC_2.2.5' //usr/lib64/libp

解压版本Python,手动安装pip报错,pip得到报错&quot; No module named &#39;pip&#39; &quot;

解压版本Python,手动安装pip报错 λ pip Traceback (most recent call last): File "runpy.py", line 193, in _run_module_as_main File "runpy.py", line 86, in _run_code File "D:\tools\python-3.8.1-embed-amd64\Scripts\pip.exe\__main__.py", line