time ./tpcc_load 127.0.0.1 tpcc1000 root "" 500 ./tpcc_load: error while loading shared libraries: libperconaserverclient.so.18: cannot open shared object file: No such file or directory
tpcc-mysql 是基於 Percona Server 開發的壓測工具,編譯時動態鏈接了 Percona 專有的客戶端庫。若測試目標為 MySQL 官方社區版,系統缺少對應的 libperconaserverclient.so.18,導致運行時鏈接失敗。
安裝與當前 Percona 版本匹配的 Percona-Server-shared 包,提供所需共享庫。
# 示例 (CentOS/RHEL 5.x x86_64, Percona 5.5.40) rpm -ivh Percona-Server-shared-55-5.5.40-rel36.1.el5.x86_64.rpm
安裝後執行 ldconfig 刷新庫緩存,再次運行 tpcc_load 即可正常加載庫文件。
configure 階段指定 `--with-mysql` 指向 MySQL 社區版安裝路徑,以鏈接標準 libmysqlclient.so,避免依賴 Percona 庫。