哎,就硬盘还不是最掉价的,1999的自配主机,VIRTUALBOX里虚拟机,聊以自慰吧。

本文涉及的产品
云数据库 RDS MySQL Serverless,0.5-2RCU 50GB
云数据库 RDS MySQL Serverless,价值2615元额度,1个月
简介: 安装时注意的问题,要是不测试MYSQL,则CONFIGURE参数和DISABLE-MYSQL,在编译时有提示的。 然后就是LIBTOOL包过老的问题,以及未安装LIBTOOL包的问题。 最后,是运行命令时的参数问题。

安装时注意的问题,要是不测试MYSQL,则CONFIGURE参数和DISABLE-MYSQL,在编译时有提示的。

然后就是LIBTOOL包过老的问题,以及未安装LIBTOOL包的问题。

最后,是运行命令时的参数问题。

~~~~~~~~~~~~~

安装sysbench0.4.12,在执行make命名中,出现了如下的报错:

Bash代码 复制代码  收藏代码
  1. /bin/sh ../libtool --tag=CC   --mode=link gcc -pthread -g -O2      -o sysbench sysbench.o sb_timer.o sb_options.o sb_logger.o db_driver.o tests/fileio/libsbfileio.a tests/threads/libsbthreads.a tests/memory/libsbmemory.a tests/cpu/libsbcpu.a tests/oltp/libsboltp.a tests/mutex/libsbmutex.a drivers/mysql/libsbmysql.a -L/usr/mysql/lib -lmysqlclient_r -lpthread -lz -lm -lrt -ldl   -lrt -laio -lm    
  2. ../libtool: line 838: X--tag=CC: command not found   
  3. ../libtool: line 871: libtool: ignoring unknown tag : command not found   
  4. ../libtool: line 838: X--mode=link: command not found   
  5. ../libtool: line 1004: *** Warning: inferring the mode of operation is deprecated.: command not found   
  6. ../libtool: line 1005: *** Future versions of Libtool will require --mode=MODE be specified.: command not found   
  7. ../libtool: line 2231: X-g: command not found   
  8. ../libtool: line 2231: X-O2: command not found   
  9. ../libtool: line 1951: X-L/u01/mysql/lib: No such file or directory   
  10. ../libtool: line 2400: Xsysbench: command not found  
/bin/sh ../libtool --tag=CC   --mode=link gcc -pthread -g -O2      -o sysbench sysbench.o sb_timer.o sb_options.o sb_logger.o db_driver.o tests/fileio/libsbfileio.a tests/threads/libsbthreads.a tests/memory/libsbmemory.a tests/cpu/libsbcpu.a tests/oltp/libsboltp.a tests/mutex/libsbmutex.a drivers/mysql/libsbmysql.a -L/usr/mysql/lib -lmysqlclient_r -lpthread -lz -lm -lrt -ldl   -lrt -laio -lm 
../libtool: line 838: X--tag=CC: command not found
../libtool: line 871: libtool: ignoring unknown tag : command not found
../libtool: line 838: X--mode=link: command not found
../libtool: line 1004: *** Warning: inferring the mode of operation is deprecated.: command not found
../libtool: line 1005: *** Future versions of Libtool will require --mode=MODE be specified.: command not found
../libtool: line 2231: X-g: command not found
../libtool: line 2231: X-O2: command not found
../libtool: line 1951: X-L/u01/mysql/lib: No such file or directory
../libtool: line 2400: Xsysbench: command not found



这个错误的原因是sysbench源代码中自带的libtool版本太旧了,可以使用系统的libtool替代之,在sysbench的源代码根目录下执行如下的命令即可:

Bash代码 复制代码  收藏代码
  1. cp /usr/bin/libtool libtool  
cp /usr/bin/libtool libtool



第二个问题是安装完sysbench之后执行时报错:

Bash代码 复制代码  收藏代码
  1. ./sysbench: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory  
./sysbench: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory



这说明sysbench无法找到mysql的库文件,这很可能是环境变量LD_LIBRARY_PATH没有设置,设置后即可解决该问题:

Bash代码 复制代码  收藏代码
  1. export LD_LIBRARY_PATH=/usr/mysql/lib  
export LD_LIBRARY_PATH=/usr/mysql/lib



目录
相关文章
|
5月前
|
Oracle 关系型数据库 Linux
windows 11 hyper-v中oracle linux虚拟机中添加硬盘
在windows 11自带的hyper-v虚拟机中添加硬盘,并分区
71 6
|
6月前
VM 挂起虚拟机后 主机无法ping通虚拟机
VM 挂起虚拟机后 主机无法ping通虚拟机
59 0
|
7月前
|
网络安全 虚拟化 Windows
同一个局域网主机中的一台主机连接另一台主机的虚拟机
同一个局域网主机中的一台主机连接另一台主机的虚拟机
|
3天前
|
Linux Windows
虚拟机添加新硬盘之linux系统篇
虚拟机添加新硬盘之linux系统篇
|
4天前
|
编解码 Oracle iOS开发
VirtualBox虚拟机安装Mac OS X Lion系统详解
VirtualBox虚拟机安装Mac OS X Lion系统详解
|
20天前
|
网络协议 Linux 程序员
【Linux】虚拟机ipv4地址消失,主机ping不通
【Linux】虚拟机ipv4地址消失,主机ping不通
37 0
|
1月前
|
虚拟化
【虚拟机】VMware 扩展硬盘大小提示 指定的虚拟磁盘需要进行修复
【虚拟机】VMware 扩展硬盘大小提示 指定的虚拟磁盘需要进行修复
|
3月前
|
存储 Linux KVM
|
4月前
|
Kubernetes Linux 数据安全/隐私保护
k8s安装环境准备:Virtualbox安装CentOS;复制多个CentOS虚拟机
k8s安装环境准备:Virtualbox安装CentOS;复制多个CentOS虚拟机
65 0
|
5月前
主机ping不通虚拟机,虚拟机可以ping同主机
主机ping不通虚拟机,虚拟机可以ping同主机
98 0