Redhat 7上的Sysbench与Mysqltesting错误 – PANIC:在调用Lua API时无保护错误(无法打开oltp:没有这样的文件或目录)

在redhat 7上使用sysbenchtestingmysql基准testing时:

sysbench --test=oltp --oltp-table-size=1000000 --mysql-db=test --mysql-user=root --mysql-password=yourrootsqlpassword prepare 

我得到这个错误:

 **PANIC: unprotected error in call to Lua API (cannot open oltp: No such file or directory)** 

谷歌search后的解决scheme是,它正在寻找一个oltp文件,但没有find它。 显然,他们移动它,它从来没有文件从一些github的评论说。

您可以通过转到/ usr来find该文件,然后执行如下操作:

 find . -name 'oltp*'* 

它会显示你的文件所在的位置。 从那里只需更新该命令中的URL即可:

 sysbench --test=<NEW PATH HERE> --oltp-table-size=1000000 --mysql-db=test --mysql-user=root --mysql-password=yourrootsqlpassword prepare* 

我在:/usr/share/doc/sysbench/tests/db/oltp.lua