Linux中启动数据库问题出现:Error while loading shared libraries: libpq.so.5: cannot open shared object file
1. Linux中启动数据库问题出现错误
项目在linux系统中安装了pg数据库。结果单独启动数据库时就出现:Error while loading shared libraries: libpq.so.5: cannot open shared object file错误
2. 原因
linux菜鸟表示不知道为什么。哪位大神知道,请指导一下,谢谢。
3.解决办法
打开.bashrc文件,使用以下命令:
~/.bashrc
在文件中加入:
export LD_LIBRARY_PATH=/usr/local/postgresql/lib
路径视自己的安装路径情况而定。
然后
source ~/.bashrc