标签:loading cannot shared error file
安装编译完后sysbench后,报错。
报错信息:
[root@mysql5 dongbo]# sysbench -v
sysbench: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory
解决方法:
1、
[root@mysql5 dongbo]# ls -l /usr/local/mysql/lib/libmysqlclient.so.18*
lrwxrwxrwx. 1 mysql mysql 24 Aug 13 19:16 /usr/local/mysql/lib/libmysqlclient.so.18 -> libmysqlclient.so.18.0.0
-rwxr-xr-x.1 mysql mysql 6892140 Aug 13 19:16/usr/local/mysql/lib/libmysqlclient.so.18.0.0
文件是存在的,使用软链接连接下;
[root@mysql5 dongbo]# ln -s /usr/local/mysql/lib/libmysqlclient.so.18 /usr/lib/
此时测试是否可以,如果不可以进行第二步。
2、
[root@mysql5 dongbo]# vi /etc/ld.so.conf
在末尾加上: export LD_LIBRARY_PATH=/usr/local/mysql/lib mysql的安装目录。
[root@mysql5 dongbo]# ldconfig
[root@mysql5 dongbo]# sysbench -v
Unknown command: -v.
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 [64K]
--tx-rate=N target transaction rate (tps) [0]
--tx-jitter=N target transaction variation, in microseconds [0]
--report-interval=N periodically report intermediate statistics with a specified interval in seconds. 0 disables intermediate reports [0]
--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 [off]
--rand-init=[on|off] initialize random number generator [off]
--rand-type=STRING random numbers distribution {uniform,gaussian,special} [special]
--rand-spec-iter=N number of iterations used for numbers generation [12]
--rand-spec-pct=N percentage of values to be treated as ‘special‘ (for special distribution) [1]
--rand-spec-res=N percentage of ‘special‘ values to use (for special distribution) [75]
--rand-seed=N seed for random number generator, ignored when 0 [0]
Log options:
--verbosity=N verbosity level {5 - debug, 0 - only critical messages} [3]
--percentile=N percentile rank of query response times to count [95]
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
Commands: prepare run cleanup help version
See ‘sysbench --test=<name> help‘ for a list of options for each test.
此时基本可以确定问题解决。
。
本文出自 “MySQL_db” 博客,请务必保留此出处http://mysqldb.blog.51cto.com/10264653/1687969
sysbench: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file
标签:loading cannot shared error file
原文地址:http://mysqldb.blog.51cto.com/10264653/1687969