isql unixODBC Driver Manager Can’t open lib ‘usrlib64psqlodbcw.so’

新建 ssh 链接后,试图使用 isql 时报错:

$ isql -v db
[01000][unixODBC][Driver Manager]Can't open lib '/usr/lib64/psqlodbcw.so' : file not found
[ISQL]ERROR: Could not SQLConnect

明明 /usr/lib64/psqlodbcw.so 已经存在了,读写权限也没有问题,不知道为什么还继续报错,后来发现有网友遇到类似问题,参见 isql | unixODBC | Driver Manager can’t open lib “libsqora.so.12.1”,抱着死马当活马医的心态试了一下设置 LD_LIBRARY_PATH 环境变量,竟然好了。

$ export LD_LIBRARY_PATH=/usr/local/pgsql/lib:$LD_LIBRARY_PATH
$ isql -v db
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL>
Advertisements

分类:默认目录, PostgreSQL

Tagged as:

2 replies

发表评论

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

WordPress.com Logo

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 /  更改 )

w

Connecting to %s