Weird Can’t open lib ‘/usr/pgsql-9.5/lib/psqlodbcw.so’ : file not found error

I have read a couple of posts on ECN and have found that people experience difficulties when installing Documentum/PostgreSQL build – they get something like:

[dmadmin@docu73dev01 bin]$ dmdbtest -Ddctm_psql -SDCTM_PSQL -Udctm_psql -PLWlW2k0CbEne
Failed to make a database connection using the following data:
   Database Server: DCTM_PSQL
   Database Name  : dctm_psql
   User Name      : dctm_psql
   User Password  : Check either the -P flag on command line or 
                    the password file specified in your server.ini
  Error from database system is:  STATE=01000, CODE=0, MSG=[unixODBC][Driver Manager]Can't open lib '/usr/pgsql-9.5/lib/psqlodbcw.so' : file not found
ERROR(-1)   (system code: -1)
[dmadmin@docu73dev01 bin]$ ls -la /usr/pgsql-9.5/lib/psqlodbcw.so
-rwxr-xr-x 1 root root 436904 Aug 27 14:02 /usr/pgsql-9.5/lib/psqlodbcw.so
[dmadmin@docu73dev01 bin]$ file dmdbtest 
dmdbtest: setuid setgid ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, BuildID[sha1]=6a65a8e84e78f9745a5c4ad6e5e695ec30e58b56, not stripped
[dmadmin@docu73dev01 bin]$ file /usr/pgsql-9.5/lib/psqlodbcw.so
/usr/pgsql-9.5/lib/psqlodbcw.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=bde7b12fe740dc03718b62030ba27ad0a1007dce, stripped
[dmadmin@docu73dev01 bin]$ 

i.e. all files exist, architecture is the same, but installation fails, and the best recipe for now is to download docker image from support portal and extract ODBC drivers from that image – good job EMC. More strange thing is I do not experience such difficultiesfollow my hands:

[dmadmin@docu73dev01 bin]$ mv liblber-2.4.so.2 liblber-2.4.so.2.bak
[dmadmin@docu73dev01 bin]$ dmdbtest -Ddctm_psql -SDCTM_PSQL -Udctm_psql -PLWlW2k0CbEne
Database successfully opened.
Test table successfully created.
Test view successfully created.
Test index successfully created.
Insert into table successfully done.
Index successfully dropped.
View successfully dropped.
Database case sensitivity test successfully past. 
Table successfully dropped.
[dmadmin@docu73dev01 bin]$ 

4 thoughts on “Weird Can’t open lib ‘/usr/pgsql-9.5/lib/psqlodbcw.so’ : file not found error

  1. Hi Andrey,

    I have just posted a Document that explains how I manged to run Docker Image provided by Documentum.
    https://community.emc.com/docs/DOC-56225

    The issue you are highlighting is still occurring even though it has setup the Documentum completely.

    [dmadmin@centstateless /]$ dmdbtest -D192.168.0.11 -S192.168.0.11 -Upostgres -Ppassword
    Failed to make a database connection using the following data:
    Database Server: 192.168.0.11
    Database Name : 192.168.0.11
    User Name : postgres
    User Password : Check either the -P flag on command line or
    the password file specified in your server.ini
    Error from database system is: STATE=IM002, CODE=0, MSG=[unixODBC][Driver Manager]Data source name not found, and no default driver specified
    ERROR(-1) (system code: -1)

    [dmadmin@centstateless /]$ dmdbtest -Ddctm_psql -SDCTM_PSQL -Udctm_psql -PLWlW2k0CbEne
    Failed to make a database connection using the following data:
    Database Server: DCTM_PSQL
    Database Name : dctm_psql
    User Name : dctm_psql
    User Password : Check either the -P flag on command line or
    the password file specified in your server.ini
    Error from database system is: STATE=IM002, CODE=0, MSG=[unixODBC][Driver Manager]Data source name not found, and no default driver specified
    ERROR(-1) (system code: -1)
    [dmadmin@centstateless /]$

    Like

  2. The issue you are highlighting is still occurring even though it has setup the Documentum completely.

    I do not see any relationship between this post and problem you described. In your case it seems that you do not understand ODBC concepts.

    dmdbtest command-line arguments are:

    Usage 3: dmdbtest -D<database name> -S<server connect> -U<UserName> -P<Password>
    

    where:
    * server connect – name of record in odbc.ini
    * database name – name of database in PostgreSQL

    my odbcinst.ini looks like:

    [PostgreSQL95]
    Description     = ODBC for PostgreSQL
    Driver          = /usr/pgsql-9.5/lib/psqlodbcw.so
    Setup           = /usr/lib64/libodbcpsqlS.so
    FileUsage       = 1
    

    and odbc.ini looks like:

    [DCTM_PSQL]
    Description = PostgreSQL connection to DCTM_PSQL 
    Driver = PostgreSQL95 <-- name of driver in odbcinst.ini
    Servername = localhost
    Port = 5432
    Protocol = 7.4
    ReadOnly = No
    RowVersioning = No
    ShowSystemTables = No
    ShowOidColumn=No
    FakeOidIndex=No
    ConnSettings=
    UpdateableCursors=Yes
    DEBUG=Yes
    

    Like

  3. Thanks Andrey.
    You are right! I didn’t understand the usage of dmdbtest.

    I tried psql directly from Documentum Docker and got the issues related to some libraries, hence tried the option with dmdbtest without knowing the usage of it.

    It is working for me now. Thanks for the explanation.

    Like

  4. Pingback: PostgreSQL performance | Documentum in a (nuts)HELL

Leave a Reply

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 / Change )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s