Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9003197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:40:55+00:00 2026-06-16T00:40:55+00:00

I had the PostgreSQL drivers working on my RHEL 6. But after I installed

  • 0

I had the PostgreSQL drivers working on my RHEL 6. But after I installed Microsoft® SQL Server® ODBC Driver 1.0 for Linux I can no longer connect to PosgreSQL data sources. I can connect to SQL Server data sources fine.

When I had this same issue a week ago I uninstalled MS SQL Server ODBC driver from Linux and it fixed the issue. I removed MS SQL Server ODBC driver by executing the following commands:

rm /usr/bin/bcp
rm /usr/bin/sqlcmd
odbcinst -u -d -n "SQL Server Native Client 11.0"
rm -r /opt/microsoft/sqlncli

I still had to copy the psqlodbcw.so file (MS drivers installation made them inaccessible despite their existence) from another Linux machine that had PostgreSQL drivers working.

Again, I needed to use MS SQL drivers and so installed again. With MS SQL drivers installed again – I again failed to connect to PostgreSQL drivers. Though, I did not uninstall MS SQL drivers and checked what was going on. This time around I found that the setup files had got deleted: /usr/lib64/libodbcpsqlS.so. However, replenishing the file did not fix the issue since I did not uninstall MS SQL as in the previous case.

I kept getting the following error message in spite of the file being present with rwx permisions:

[root@localhost lib64]# isql -v STUDENT dsname pwd12345
[01000][unixODBC][Driver Manager]Can't open lib '/usr/lib64/psqlodbc.so' : file not found
[ISQL]ERROR: Could not SQLConnect
[root@localhost lib64]# 

Here is a printout of the file permissions:

[root@localhost lib64]# ls -al p*.so
lrwxrwxrwx. 1 root root     12 Dec  7 09:15 psqlodbc.so -> psqlodbcw.so
-rwxr-xr-x. 1 root root 519496 Dec  7 09:35 psqlodbcw.so

and my odbcinst.ini file looks as follows:

[PostgreSQL]
Description=ODBC for PostgreSQL
Driver=/usr/lib/psqlodbc.so
Driver64=/usr/lib64/psqlodbc.so
Setup=/usr/lib/libodbcpsqlS.so
Setup64=/usr/lib64/libodbcpsqlS.so
FileUsage=1
UsageCount=4

I also referred to this link: http://mailman.unixodbc.org/pipermail/unixodbc-support/2010-September.txt

Output from running:

[root@localhost bin]# ldd /usr/lib64/psqlodbc.so 
    linux-vdso.so.1 =>  (0x00007fff371ea000)
    libssl.so.10 => /usr/lib64/libssl.so.10 (0x00007f55f288f000)
    libpq.so.5 => /usr/lib64/libpq.so.5 (0x00007f55f2667000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f55f2449000)
    libodbcinst.so.2 => not found
    libodbc.so.2 => not found
    libc.so.6 => /lib64/libc.so.6 (0x00007f55f20b5000)
    libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007f55f1e73000)
    libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007f55f1b94000)
    libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f55f198f000)
    libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f55f1763000)
    libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007f55f13c9000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00007f55f11c4000)
    libz.so.1 => /lib64/libz.so.1 (0x00007f55f0fae000)
    libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f55f0d77000)
    libldap_r-2.4.so.2 => /lib64/libldap_r-2.4.so.2 (0x00007f55f0b23000)
    /lib64/ld-linux-x86-64.so.2 (0x0000003d6f600000)
    libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007f55f0918000)
    libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f55f0715000)
    libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f55f04fa000)
    libfreebl3.so => /lib64/libfreebl3.so (0x00007f55f0298000)
    liblber-2.4.so.2 => /lib64/liblber-2.4.so.2 (0x00007f55f0088000)
    libssl3.so => /usr/lib64/libssl3.so (0x00007f55efe4c000)
    libsmime3.so => /usr/lib64/libsmime3.so (0x00007f55efc20000)
    libnss3.so => /usr/lib64/libnss3.so (0x00007f55ef8e3000)
    libnssutil3.so => /usr/lib64/libnssutil3.so (0x00007f55ef6bd000)
    libplds4.so => /lib64/libplds4.so (0x00007f55ef4b9000)
    libplc4.so => /lib64/libplc4.so (0x00007f55ef2b3000)
    libnspr4.so => /lib64/libnspr4.so (0x00007f55ef076000)
    libsasl2.so.2 => /usr/lib64/libsasl2.so.2 (0x00007f55eee5c000)
    libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f55eec3c000)

I don’t want to uninstall the MS SQL drivers from my Linux machine to get the PostgreSQL drivers to work. I want both drivers to work on Linux.

Craig Ringer suggested to run:

[root@localhost bin]# LD_DEBUG=libs isql -v STUDENT dsname pwd12345
     22029: find library=libodbc.so.1 [0]; searching
     22029:  search path=/usr/lib64/tls/x86_64:/usr/lib64/tls:/usr/lib64/x86_64:/usr/lib64      (system search path)
     22029:   trying file=/usr/lib64/tls/x86_64/libodbc.so.1
     22029:   trying file=/usr/lib64/tls/libodbc.so.1
     22029:   trying file=/usr/lib64/x86_64/libodbc.so.1
     22029:   trying file=/usr/lib64/libodbc.so.1
     22029: 
     22029: find library=libdl.so.2 [0]; searching
     22029:  search path=/usr/lib64/tls:/usr/lib64      (system search path)
     22029:   trying file=/usr/lib64/tls/libdl.so.2
     22029:   trying file=/usr/lib64/libdl.so.2
     22029:  search cache=/etc/ld.so.cache
     22029:   trying file=/lib64/libdl.so.2
     22029: 
     22029: find library=libpthread.so.0 [0]; searching
     22029:  search path=/usr/lib64/tls:/usr/lib64      (system search path)
     22029:   trying file=/usr/lib64/tls/libpthread.so.0
     22029:   trying file=/usr/lib64/libpthread.so.0
     22029:  search cache=/etc/ld.so.cache
     22029:   trying file=/lib64/libpthread.so.0
     22029: 
     22029: find library=libc.so.6 [0]; searching
     22029:  search path=/usr/lib64/tls:/usr/lib64      (system search path)
     22029:   trying file=/usr/lib64/tls/libc.so.6
     22029:   trying file=/usr/lib64/libc.so.6
     22029:  search cache=/etc/ld.so.cache
     22029:   trying file=/lib64/libc.so.6
     22029: 
     22029: 
     22029: prelink checking: ok
     22029: 
     22029: calling init: /lib64/libpthread.so.0
     22029: 
     22029: 
     22029: calling init: /lib64/libc.so.6
     22029: 
     22029: 
     22029: calling init: /lib64/libdl.so.2
     22029: 
     22029: 
     22029: calling init: /usr/lib64/libodbc.so.1
     22029: 
     22029: 
     22029: initialize program: isql
     22029: 
     22029: 
     22029: transferring control: isql
     22029: 
     22029: find library=libnss_files.so.2 [0]; searching
     22029:  search path=/usr/lib64/tls:/usr/lib64      (system search path)
     22029:   trying file=/usr/lib64/tls/libnss_files.so.2
     22029:   trying file=/usr/lib64/libnss_files.so.2
     22029:  search cache=/etc/ld.so.cache
     22029:   trying file=/lib64/libnss_files.so.2
     22029: 
     22029: 
     22029: calling init: /lib64/libnss_files.so.2
     22029: 
     22029: 
     22029: calling init: /usr/lib64/gconv/UTF-16.so
     22029: 
     22029: find library=libssl.so.10 [0]; searching
     22029:  search path=/usr/lib64/tls:/usr/lib64      (system search path)
     22029:   trying file=/usr/lib64/tls/libssl.so.10
     22029:   trying file=/usr/lib64/libssl.so.10
     22029: 
     22029: find library=libpq.so.5 [0]; searching
     22029:  search path=/usr/lib64/tls:/usr/lib64      (system search path)
     22029:   trying file=/usr/lib64/tls/libpq.so.5
     22029:   trying file=/usr/lib64/libpq.so.5
     22029: 
     22029: find library=libodbcinst.so.2 [0]; searching
     22029:  search path=/usr/lib64/tls:/usr/lib64      (system search path)
     22029:   trying file=/usr/lib64/tls/libodbcinst.so.2
     22029:   trying file=/usr/lib64/libodbcinst.so.2
     22029:  search cache=/etc/ld.so.cache
     22029:  search path=/lib64/tls/x86_64:/lib64/tls:/lib64/x86_64:/lib64:/usr/lib64/tls:/usr/lib64        (system search path)
     22029:   trying file=/lib64/tls/x86_64/libodbcinst.so.2
     22029:   trying file=/lib64/tls/libodbcinst.so.2
     22029:   trying file=/lib64/x86_64/libodbcinst.so.2
     22029:   trying file=/lib64/libodbcinst.so.2
     22029:   trying file=/usr/lib64/tls/libodbcinst.so.2
     22029:   trying file=/usr/lib64/libodbcinst.so.2
     22029: 
[01000][unixODBC][Driver Manager]Can't open lib '/usr/lib64/psqlodbc.so' : file not found
[ISQL]ERROR: Could not SQLConnect
     22029: 
     22029: calling fini: isql [0]
     22029: 
     22029: 
     22029: calling fini: /usr/lib64/libodbc.so.1 [0]
     22029: 
     22029: 
     22029: calling fini: /lib64/libdl.so.2 [0]
     22029: 
     22029: 
     22029: calling fini: /lib64/libpthread.so.0 [0]
     22029: 
     22029: 
     22029: calling fini: /lib64/libnss_files.so.2 [0]
     22029: 
     22029: 
     22029: calling fini: /usr/lib64/gconv/UTF-16.so [0]
     22029: 
     22029: 
     22029: calling fini: /lib64/libc.so.6 [0]
     22029: 
[root@localhost bin]# 

John Greene suggested:

[root@localhost bin]# ldd /usr/bin/isql 
    linux-vdso.so.1 =>  (0x00007fff12cf9000)
    libodbc.so.1 => /usr/lib64/libodbc.so.1 (0x0000003ef0800000)
    libdl.so.2 => /lib64/libdl.so.2 (0x0000003d6fe00000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003d70200000)
    libc.so.6 => /lib64/libc.so.6 (0x0000003d6fa00000)
    /lib64/ld-linux-x86-64.so.2 (0x0000003d6f600000)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T00:40:56+00:00Added an answer on June 16, 2026 at 12:40 am

    I ran: rpm -q unixODBC to check if unixODBC was still installed and unfortunately found out that it wasn’t. The unixODBC drivers had somehow got uninstalled after installing SQL Server drivers without explicit intervention. I installed with yum install unixODBC.x86_64. And for the first time, I got both SQL Server drivers,PostgreSQL drivers and other drivers to connect to their respective data sources from the same machine (RHEL 6).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to install postgresql on my server using chef-solo. I've had this working
I have a little silly question. I have installed a PostgreSQL DB Server, but
I am doing some research on migrating away from Microsoft sql server to postgresql
Usually I worked with PostgreSQL and never had a problem, but now I need
Had a good read through similar topics but I can't quite a) find one
Had a good search here but can't see anything that gets my mind in
I had Postgres 9.0.x installed with homebrew, but because of lack of some modules
I recently migrated from a PostgreSQL database to a SQL Server database. To switch
I have to migrate some SQL from PostgreSQL to SQL Server (2005+). On PostgreSQL
I'm fairly new to PostgreSQL. I'm working with a table that has not had

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.