哎,就硬盘还不是最掉价的,1999的自配主机,VIRTUALBOX里虚拟机,聊以自慰吧。
2014-03-09 10:05
330 查看
安装时注意的问题,要是不测试MYSQL,则CONFIGURE参数和DISABLE-MYSQL,在编译时有提示的。
然后就是LIBTOOL包过老的问题,以及未安装LIBTOOL包的问题。
最后,是运行命令时的参数问题。
~~~~~~~~~~~~~
安装sysbench0.4.12,在执行make命名中,出现了如下的报错:
Bash代码
/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代码
cp /usr/bin/libtool libtool
第二个问题是安装完sysbench之后执行时报错:
Bash代码
./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代码
export LD_LIBRARY_PATH=/usr/mysql/lib
然后就是LIBTOOL包过老的问题,以及未安装LIBTOOL包的问题。
最后,是运行命令时的参数问题。
~~~~~~~~~~~~~
安装sysbench0.4.12,在执行make命名中,出现了如下的报错:
Bash代码
/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
/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代码
cp /usr/bin/libtool libtool
cp /usr/bin/libtool libtool
第二个问题是安装完sysbench之后执行时报错:
Bash代码
./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代码
export LD_LIBRARY_PATH=/usr/mysql/lib
export LD_LIBRARY_PATH=/usr/mysql/lib
相关文章推荐
- 虚拟机virtualbox中挂载新硬盘
- virtualbox创建虚拟机及增加硬盘记录
- 实现主机(ubuntu)与虚拟机(virtualbox)的资源共享
- VirtualBox 配置虚拟网卡(桥接),实现主机-虚拟机网络互通(图文教程)
- VirtualBox 配置虚拟网卡(桥接),实现主机-虚拟机网络互通(适用于ubuntu系统)
- VirtualBox扩展虚拟机硬盘
- VirtualBox 从主机访问虚拟机中系统host only network设置
- 虚拟机(Virtualbox-Ubuntu)与主机(WIN7)共享文件夹设置 &&19条小技巧让你快速上手Ubuntu 11.04
- virtualbox 虚拟机 网络配置(可联网,主机虚拟机可互访)
- VirtualBox 主机与虚拟机互相访问且均上外网
- Virtualbox中的XP虚拟机和主机Win7之间的共享文件夹
- VMware Disk Mount Utility将VMware Workstation虚拟机硬盘映射到主机的方法
- Virtualbox主机和虚拟机之间文件夹共享及双向拷贝(Windows<->Windows, Windows<->Linux)
- VirtualBox主机与虚拟机不能复制粘贴的解决办法
- virtualbox 虚拟机 ubuntu中下添加硬盘实录
- VirtualBox 设置静态ip,实现虚拟机和宿主机互相访问,并能访问网络
- virtualBox实现主机和虚拟机相互ping通,配置静态IP地址
- VirtualBox设置虚拟机Host-only与宿主机连接
- VirtualBox实现宿主机和虚拟机之间网络的通讯
- Ubuntu下virtualbox nat网络模式下 实现宿主机访问虚拟机