error while loading shared libraries libpq.so.5

执行 initdb 时遇到错误:

/usr/local/pgsql/bin/postgres: error while loading shared libraries: libpq.so.5: cannot open shared object file: No such file or directory

发现该库文件存在,尝试更新一下环境变量:

[pg@/usr/local/pgsql]#export PATH=/usr/local/pgsql/bin:$PATH;export LD_LIBRARY_PATH=/usr/local/pgsql/lib:$LD_LIBRARY_PATH

无效,更新 ldconfig 之后正常了。

[pg@/usr/local/pgsql]#echo "/usr/local/pgsql/lib" >> /etc/ld.so.conf
[pg@/usr/local/pgsql]#ldconfig
Advertisements

分类:默认目录, PostgreSQL

Tagged as:

发表评论

Fill in your details below or click an icon to log in:

WordPress.com 徽标

You are commenting using your WordPress.com account. Log Out /  更改 )

Google+ photo

You are commenting using your Google+ account. Log Out /  更改 )

Twitter picture

You are commenting using your Twitter account. Log Out /  更改 )

Facebook photo

You are commenting using your Facebook account. Log Out /  更改 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.