背景
我的环境有MySQL、PostgreSQL数据库,为了压测方便我安装了sysbench
[root]# git clone https://github.com/akopytov/sysbench.git
[root]# cd sysbench
[root]# sh autogen.sh
[root]# ./configure --with-pgsql --with-pgsql-includes=/usr/local/postgresql/include --with-pgsql-libs=/usr/local/postgresql/lib
[root]# make && make install
查看sysbench版本报错
[root]# sysbench --help
sysbench: error while loading shared libraries: libpq.so.5: cannot open shared object file: No such file or directory
解决办法
将PostgreSQL的lib路径加到环境变量中
[root]# echo "export LD_LIBRARY_PATH=/usr/local/postgresql/lib" >> /etc/profile
[root]# source /etc/profile
再次查看sysbench版本
[root@host71 etc]# sysbench --version
sysbench 1.1.0
标签:No,--,file,such,shared,root,sysbench From: https://www.cnblogs.com/haha029/p/16720453.html