wmjie / ibm-db

Automatically exported from code.google.com/p/ibm-db
0 stars 0 forks source link

Using on freebsd, lib error #98

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have installed as per the ibmdocs for linux, and placed the required linux 
libs in /compact/linux/lib/

But i get the import error:

>>> import ibm_db
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: Shared object "libdb2.so.1" not found, required by "ibm_db.so"
If I place the file manually in /usr/lib or symlink it I get a read error:

>>> import ibm_db
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: /usr/lib/libdb2.so.1: Undefined symbol "strcspn"

If anyone could help on this I would be forever grateful!!

I have installed ibm_db and both ibm_db_sa without failure, I just think its 
more of an issue trying to use the linux app on bsd.

Original issue reported on code.google.com by pumalo...@gmail.com on 15 Mar 2012 at 8:24

GoogleCodeExporter commented 9 years ago
Don't put the single lib file to any location, If you need to connect through 
python on same DB2 server on same local machine the set your LD_LIBRARY_PATH 
environment variable to <DB2_HOME>/sqllib/lib:$LD_LIBRARY_PATH.

If you need to connect to a remote DB2 server and no local DB2 server is 
available then you need to install DS Driver (Available at 
https://www-304.ibm.com/support/docview.wss?uid=swg27016878) and set your 
LD_LIBRARY_PATH environment variable to 
<DS_DRIVER_FOLDER>/odbc_cli_driver/linux/clidriver/lib:$LD_LIBRARY_PATH.

Please try the above solution and let us know how it goes for you.

Original comment by rahul.pr...@in.ibm.com on 19 Mar 2012 at 6:22

GoogleCodeExporter commented 9 years ago
Hi, thanks for the reply, unfortunately I get the same error:

Python 2.7.2 (default, Aug  9 2011, 08:10:52) 
[GCC 4.2.1 20070719  [FreeBSD]] on freebsd8
Type "help", "copyright", "credits" or "license" for more information.
>>> import ibm_db
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: /compat/linux/lib/libdb2.so.1: Undefined symbol "strcspn"

Original comment by pumalo...@gmail.com on 19 Mar 2012 at 11:47

GoogleCodeExporter commented 9 years ago
Its the same error for wherever the driver is loaded from

Original comment by pumalo...@gmail.com on 19 Mar 2012 at 11:49

GoogleCodeExporter commented 9 years ago
If its of any help:

% echo $LD_LIBRARY_PATH                                        
/lib:/usr/lib:/usr/local/lib:/home/luke/informix/dsdriver/:/home/luke/informix/d
sdriver/lib:/compat/linux/lib

Original comment by pumalo...@gmail.com on 19 Mar 2012 at 12:02

GoogleCodeExporter commented 9 years ago
By setting LDCONFIG environment variable, user is now able to import ibm_db.

Original comment by rahul.pr...@in.ibm.com on 21 Mar 2012 at 9:06

GoogleCodeExporter commented 9 years ago
This issue isnt closed as I still get the same import error.

Original comment by crook...@gmail.com on 22 Mar 2012 at 8:12