加载共享库时出错:libpq.so.5:无法打开共享对象文件:没有这样的文件或目录 [英] Error while loading shared libraries: libpq.so.5: cannot open shared object file: No such file or directory

查看:10300
本文介绍了加载共享库时出错:libpq.so.5:无法打开共享对象文件:没有这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Debian上运行的PostgreSQL 9.0.4服务器上执行 pg_dump ,我收到以下错误:

I am trying to execute pg_dump on PostgreSQL 9.0.4 server running on Debian and I am getting the error below:

./pg_dump: error while loading shared libraries: libpq.so.5: cannot open shared object file: No such file or directory 

libpq.so.5 是指向 libpq.so的链接.5.3 如下所示

lrwxrwxrwx 1 root root     12 Jun 27 16:24 libpq.so.5 -> libpq.so.5.3
-rwxr-xr-x 1 root root 180749 Jun 21 02:43 libpq.so.5.3

我做错了什么?

推荐答案

尝试这个:

1:知道路径 libpq.so.5

find / -name libpq.so.5

输出示例:
/usr/pgsql-9.4/lib/libpq.so.5
如果没有找到任何内容,请检查是否已经安装了适合的postgresql-libs您的postgresql版本和您的操作系统平台

Output example: /usr/pgsql-9.4/lib/libpq.so.5 If found nothing, check if you have already installed the suitable postgresql-libs for your postgresql version and your OS platform

2:在知名库路径(如 / usr / lib

2: Symbolic link that library in a "well known" library path like /usr/lib:

ln -s /usr/pgsql-9.4/lib/libpq.so.5 /usr/lib/libpq.so.5

注意:
如果你的平台是64位,你必须还有符号链接到64位库路径:

Attention: If your platform is 64 bit, you MUST also symbolic link to 64 bit libraries path:

ln -s /usr/pgsql-9.4/lib/libpq.so.5 /usr/lib64/libpq.so.5

3:Be h appy!

3: Be happy !

这篇关于加载共享库时出错:libpq.so.5:无法打开共享对象文件:没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆