0%

postgresql报错libpq.so.5

postgresql报错Error while loading shared libraries: libpq.so.5: cannot open shared object file

一次远程执行服务器脚本删除postgresql数据,报错postgresql报错Error while loading shared libraries: libpq.so.5: cannot open shared object file,记录下

在环境变量中添加LD_LIBRARY_PATH

1
2
3
4
5
vim .bashrc
#添加
export LD_LIBRARY_PATH=/usr/local/postgresql/lib
#执行
source .bashrc

/usr/local/postgresql/lib是数据库安装目录下的lib包