首页 > 其他分享 >sysbench: error while loading shared libraries: libpq.so.5: cannot open shared object file: No such

sysbench: error while loading shared libraries: libpq.so.5: cannot open shared object file: No such

时间:2022-09-22 18:48:13浏览次数:50  
标签:No -- file such shared root sysbench

背景

我的环境有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

相关文章