Cant install on Redhat

703 views
Skip to first unread message

Gennadiy Civil

unread,
Jan 22, 2013, 1:22:27 PM1/22/13
to ibm...@googlegroups.com
Hello
Trying to install on RedHat,

1) Create new virtual env
2) install into this virtual env

Getting an error - any help is appreciated, thanks!



(DB2_TEST_DT20)[ ro...@localhost.localdomain ~  ]
$ easy_install ibm_db
Searching for ibm-db
Reading http://pypi.python.org/simple/ibm_db/
Reading http://code.google.com/p/ibm-db/downloads/list
Best match: ibm-db 2.0.0
Downloading http://pypi.python.org/packages/source/i/ibm_db/ibm_db-2.0.0.tar.gz#md5=709c576c0ec2379ca15049f5c861beb1
Processing ibm_db-2.0.0.tar.gz
Running ibm_db-2.0.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-YGWmIp/ibm_db-2.0.0/egg-dist-tmp-Nl_tXz
Detected 64-bit Python
In file included from ibm_db.c:27:
ibm_db.h:15:21: error: sqlcli1.h: No such file or directory
ibm_db.h:31:1: warning: "PyObject_CheckBuffer" redefined
In file included from //opt/python/current/include/python2.7/Python.h:133,
                 from ibm_db.c:26:
//opt/python/current/include/python2.7/abstract.h:534:1: warning: this is the location of the previous definition
In file included from ibm_db.c:27:
ibm_db.h:183: error: ‘SQL_MAX_MESSAGE_LENGTH’ undeclared here (not in a function)
ibm_db.h:183: error: ‘SQL_SQLSTATE_SIZE’ undeclared here (not in a function)
ibm_db.c:38: error: expected ‘)’ before ‘handle’
ibm_db.c:40: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
ibm_db.c:41: error: expected ‘)’ before ‘*’ token
ibm_db.c:71: error: expected specifier-qualifier-list before ‘SQLSMALLINT’
ibm_db.c:91: error: expected specifier-qualifier-list before ‘SQLHANDLE’
ibm_db.c:147: error: expected specifier-qualifier-list before ‘SQLINTEGER’
ibm_db.c:158: error: expected specifier-qualifier-list before ‘SQLINTEGER’
ibm_db.c:163: error: expected specifier-qualifier-list before ‘SQLCHAR’
ibm_db.c:180: error: expected specifier-qualifier-list before ‘SQLHANDLE’
ibm_db.c: In function ‘_python_ibm_db_free_conn_struct’:
ibm_db.c:304: error: ‘conn_handle’ has no member named ‘handle_active’
ibm_db.c:304: error: ‘conn_handle’ has no member named ‘flag_pconnect’
ibm_db.c:305: error: ‘conn_handle’ has no
...
many more

Mario Briggs

unread,
Jan 23, 2013, 12:16:21 AM1/23/13
to ibm...@googlegroups.com
For 64 bit platforms, compilation of the driver happens

Are you installing on the same machine as where DB2 Server is ?
A)  If yes - ensure u have set IBM_DB_HOME
B) If no - ensure u have the IBM Data Server Driver Package installed and set IBM_DB_HOME

The error is that it is not finding the header files. My hunch is that you are in B), but dont have the IBM Data Server Driver Package , but instead have the CLI thin client

Mario


Gennadiy Civil

unread,
Jan 23, 2013, 2:11:48 PM1/23/13
to ibm...@googlegroups.com

Thank you for your reply.

I am actually on the same machine as DB2 server - this is all my test box.
I set export IBM_DB_HOME=/opt/ibm/db2/V10.1, getting the same error. If I dont have this variable set I get different error message telling me to set it. So I read the message and set the variable.

Same problem. I even tried to install

IBM Data Server Driver Package , installed sucessfully ( see below ) but did not make any difference.

Any ideas?
Thanks again
Gennadiy

Rahul

unread,
Jan 24, 2013, 12:37:03 AM1/24/13
to ibm_db
Hi Gennadiy,
While installing ibm_db it searches for the include files in the
directory /opt/ibm/db2/V10.1/include directory but it seems like
either include directory or sqlcli1.h file is not available there. You
can manually verify it.
While installing DB2 you may have opted to not install header files
or your DB2 not installed correctly.

If you already have installed IBM Data Server Driver package then you
can also set set IBM_DB_HOME environment variable to this directory.

Thanks,
Rahul Priyadarshi

On Jan 24, 12:11 am, Gennadiy Civil <developer...@gmail.com> wrote:
> Thank you for your reply.
>
> I am actually on the same machine as DB2 server - this is all my test box.
> I set export IBM_DB_HOME=/opt/ibm/db2/V10.1, getting the same error. If I
> dont have this variable set I get different error message telling me to set
> it. So I read the message and set the variable.
>
> Same problem. I even tried to install
>
> IBM Data Server Driver Package<https://www-304.ibm.com/support/docview.wss?uid=swg27016878>, installed sucessfully ( see below ) but did not make any difference.
>
> Any ideas?
> Thanks again
> Gennadiy
>
>
>
>
>
>
>
> On Wednesday, January 23, 2013 12:16:21 AM UTC-5, Mario Briggs wrote:
>
> > For 64 bit platforms, compilation of the driver happens
>
> > Are you installing on the same machine as where DB2 Server is ?
> > A)  If yes - ensure u have set IBM_DB_HOME
> > B) If no - ensure u have the IBM Data Server Driver Package<https://www-304.ibm.com/support/docview.wss?uid=swg27016878>installed and set IBM_DB_HOME
>
> > The error is that it is not finding the header files. My hunch is that you
> > are in B), but dont have the IBM Data Server Driver Package<https://www-304.ibm.com/support/docview.wss?uid=swg27016878>, but instead have the CLI thin client
>
> > Mario

Joe Travaglini

unread,
Feb 20, 2013, 11:19:15 AM2/20/13
to ibm...@googlegroups.com
Hello, I'm experiencing a similar error in trying to install on RHEL6.2.

First, I started with the readme here and followed the instructions, downloading PEAK easy_install.  I notice that in the download page there is no Linux x64 egg provided.

Instead I downloaded the DS Driver package from here (both version 10.1 and 9.7, the linux x64 versions), and used the built in ibm_db egg there for the install.  (in 10.1, the egg is in IBM_DB_HOME/python/python64, whereas in 9.7 it's in IBM_DB_HOME/python64).

I have my IBM_DB_HOME set appropriately and have even tried sourcing the db2profile manually prior to install, but I receive the following error.

I'm running python 2.6.6 64-bit.

Here is the beginning of the output (there are many more errors that follow).  I'm assuming I have either the wrong version of ibm_db egg or dsdriver, or that some path is not properly set.  

Please help!! thanks


Processing ibm_db-1.0.6-py2.5-linux-x86_64.egg
removing '/usr/lib/python2.6/site-packages/ibm_db-1.0.6-py2.5-linux-x86_64.egg' (and everything under it)
creating /usr/lib/python2.6/site-packages/ibm_db-1.0.6-py2.5-linux-x86_64.egg
Extracting ibm_db-1.0.6-py2.5-linux-x86_64.egg to /usr/lib/python2.6/site-packages
ibm-db 1.0.6 is already the active version in easy-install.pth

Installed /usr/lib/python2.6/site-packages/ibm_db-1.0.6-py2.5-linux-x86_64.egg
Processing dependencies for ibm-db==1.0.6
Searching for ibm-db==1.0.6
Best match: ibm-db 1.0.6
Processing ibm_db-1.0.6.tar.gz
Running ibm_db-1.0.6/setup.py -q bdist_egg --dist-dir /tmp/easy_install-BcZDBy/ibm_db-1.0.6/egg-dist-tmp-jlr4sD
/tmp/easy_install-BcZDBy/ibm_db-1.0.6/setup.py:51: UserWarning: Detected usage of IBM Data Server Driver package. Ensure you have downloaded 64-bit package of IBM_Data_Server_Driver and retry the ibm_db module install

  warnings.warn(notifyString)
ibm_db.c:26:20: error: Python.h: No such file or directory
In file included from ibm_db.c:27:
ibm_db.h:17:26: error: structmember.h: No such file or directory
In file included from ibm_db.c:27:
ibm_db.h:155: error: expected specifier-qualifier-list before âPyObject_HEADâ
ibm_db.h:166: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âle_client_info_membersâ
ibm_db.h:178: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âclient_infoTypeâ
ibm_db.h:220: error: expected specifier-qualifier-list before âPyObject_HEADâ
ibm_db.h:246: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âle_server_info_membersâ
In file included from ibm_db.c:27:
ibm_db.h:272: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âserver_infoTypeâ
ibm_db.h:322: error: expected â)â before â*â token
ibm_db.c:39: error: expected declaration specifiers or â...â before âPyObjectâ


On Wednesday, January 23, 2013 12:16:21 AM UTC-5, Mario Briggs wrote:

Rahul

unread,
Feb 20, 2013, 12:34:01 PM2/20/13
to ibm_db
You are getting compilation error due to missing python developer
package. You can install this package by issuing command "yum install
python-devel" or "apt-get install python-dev".

>>>>
Processing ibm_db-1.0.6-py2.5-linux-x86_64.egg
removing
'/usr/lib/python2.6/site-packages/ibm_db-1.0.6-py2.5-linux-
x86_64.egg' (and
everything under it)
<<<<
This output indicate that you already have 1.0.6 version of ibm_db
package installed in your system.

In DS Driver you can also find a version of ibm_db egg. to install
this version of ibm_db you need to issue following command
"easy_install /path/to/ibm_db-1.0.6-py2.5-linux-x86_64.egg" .

Thanks,
Rahul Priyadarshi

On Feb 20, 9:19 pm, Joe Travaglini <joe.travagl...@gmail.com> wrote:
> Hello, I'm experiencing a similar error in trying to install on RHEL6.2.
>
> First, I started with the readme here<http://code.google.com/p/ibm-db/wiki/ibm_db_README> and
> followed the instructions, downloading PEAK easy_install.  I notice that in
> the download page <http://code.google.com/p/ibm-db/downloads/list> there is
> no Linux x64 egg provided.
>
> Instead I downloaded the DS Driver package from here<https://www-304.ibm.com/support/docview.wss?uid=swg27016878>(both version 10.1 and 9.7, the linux x64 versions), and used the built in
> ibm_db egg there for the install.  (in 10.1, the egg is in
> IBM_DB_HOME/python/python64, whereas in 9.7 it's in IBM_DB_HOME/python64).
>
> I have my IBM_DB_HOME set appropriately and have even tried sourcing the
> db2profile manually prior to install, but I receive the following error.
>
> I'm running python 2.6.6 64-bit.
>
> Here is the beginning of the output (there are many more errors that
> follow).  I'm assuming I have either the wrong version of ibm_db egg or
> dsdriver, or that some path is not properly set.
>
> Please help!! thanks
>
> Processing ibm_db-1.0.6-py2.5-linux-x86_64.egg
> removing
> '/usr/lib/python2.6/site-packages/ibm_db-1.0.6-py2.5-linux-x86_64.egg' (and
> everything under it)
> creating
> /usr/lib/python2.6/site-packages/ibm_db-1.0.6-py2.5-linux-x86_64.egg
> Extracting ibm_db-1.0.6-py2.5-linux-x86_64.egg to
> /usr/lib/python2.6/site-packages
> ibm-db 1.0.6 is already the active version in easy-install.pth
>
> Installed
> /usr/lib/python2.6/site-packages/ibm_db-1.0.6-py2.5-linux-x86_64.egg
> Processing dependencies for ibm-db==1.0.6
> Searching for ibm-db==1.0.6
> Readinghttp://pypi.python.org/simple/ibm-db/
> Readinghttp://code.google.com/p/ibm-db/downloads/list
> Best match: ibm-db 1.0.6
> Downloadinghttp://pypi.python.org/packages/source/i/ibm_db/ibm_db-1.0.6.tar.gz#m...
> > B) If no - ensure u have the IBM Data Server Driver Package<https://www-304.ibm.com/support/docview.wss?uid=swg27016878>installed and set IBM_DB_HOME
>
> > The error is that it is not finding the header files. My hunch is that you
> > are in B), but dont have the IBM Data Server Driver Package<https://www-304.ibm.com/support/docview.wss?uid=swg27016878>, but instead have the CLI thin client
>
> > Mario

Joe Travaglini

unread,
Feb 20, 2013, 1:48:47 PM2/20/13
to ibm...@googlegroups.com
Thanks Raul, this worked after installing the python-devel libraries.

It might help for the uninitiated like myself to include something in the README that calls this out as a requirement.

Thanks again

Rahul

unread,
Feb 22, 2013, 1:59:41 AM2/22/13
to ibm_db
ok, we will include this in our README.

Thanks,
Rahul
Reply all
Reply to author
Forward
0 new messages