 |
Forums |
Admin Start New Thread
By: Antonio Cangiano
RE: ibm_db install failed on LInux with DB29.5 [ reply ] 2007-12-28 00:09
|
Hi Qi,
when you followed the instructions from my tutorial did you also follow the following part?
"When the DB2 Setup Wizard prompts you for the type of installation requested, ensure that you select “custom” and then, when prompted with the “Features” screen a couple of clicks later, select “Base application development tools” under the section “Application Development Tools” (the check box should switch from gray to white and be marked off)."
|
By: Philip Nelson
RE: ibm_db install failed on LInux with DB29. [ reply ] 2007-12-27 23:24
|
Hello there.
From the error messages you aren't finding the DB2 libraries and header files you need.
What Linux distro are you running ?
How did you install DB2 : via db2setup (graphical) or db2install (non-graphical) ?
Did you create the instance as part of the install or later ?
It may be that you want to try creating the links again by running (as root) -
/opt/ibm/db2/V9.5/cfg/db2ln
Then try again.
HTH
Phil
|
By: Qi Zhang
ibm_db install failed on LInux with DB29.5 [ reply ] 2007-12-24 09:11
|
Hi, I tried to install DB2ONRAILS follows the instruction:http://antoniocangiano.com/rubypython-and-db2-drivers/
DB2 9.5 installed successfully on mu system. But when I install db2onrails, I got the following errors:
Building native extensions. This could take a while...
ERROR: Error installing ibm_db:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb install ibm_db
checking for SQLConnect() in -ldb2... no
checking for SQLConnect() in -ldb2... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/ruby1.8
--with-IBM_DB-dir
--without-IBM_DB-dir
--with-IBM_DB-include
--without-IBM_DB-include=${IBM_DB-dir}/include
--with-IBM_DB-lib
--without-IBM_DB-lib=${IBM_DB-dir}/lib
--with-db2lib
--without-db2lib
--with-db2lib
--without-db2lib
extconf failure: Unable to locate DB2 libraries.
Install IBM DB2 Univeral Database
or
If using rake, please set the environment variables
IBM_DB_DIR=/path/to/db2 (eg. /opt/IBM/db2/V9.1)
IBM_DB_LIB=/path/to/db2/lib (eg. /opt/IBM/db2/V9.1/lib32)
or
Try passing one of the following options to extconf.rb:
--with-IBM_DB-dir=/path/to/db2 (eg. /opt/IBM/db2/V9.1)
--with-IBM_DB-lib=/path/to/db2/lib (eg. /opt/IBM/db2/V9.1/lib32)
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/ibm_db-0.9.2 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/ibm_db-0.9.2/ext/gem_make.out
This is the content in mkmf.log:
have_library: checking for SQLConnect() in -ldb2... -------------------- no
"cc -o conftest -I. -I/usr/lib/ruby/1.8/i486-linux -I. -I/opt/ibm/db2/V9.5/lib32//include -fno-strict-aliasing -g -O2 -fPIC conftest.c -L"." -L"/usr/lib" -L"/opt/ibm/db2/V9.5/lib32//lib" -L. -rdynamic -Wl,-export-dynamic -lruby1.8-static -ldb2 -lpthread -ldl -lcrypt -lm -lc"
conftest.c: In function ‘t’:
conftest.c:3: error: ‘SQLConnect’ undeclared (first use in this function)
conftest.c:3: error: (Each undeclared identifier is reported only once
conftest.c:3: error: for each function it appears in.)
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { void ((*volatile p)()); p = (void ((*)()))SQLConnect; return 0; }
/* end */
"cc -o conftest -I. -I/usr/lib/ruby/1.8/i486-linux -I. -I/opt/ibm/db2/V9.5/lib32//include -fno-strict-aliasing -g -O2 -fPIC conftest.c -L"." -L"/usr/lib" -L"/opt/ibm/db2/V9.5/lib32//lib" -L. -rdynamic -Wl,-export-dynamic -lruby1.8-static -ldb2 -lpthread -ldl -lcrypt -lm -lc"
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { SQLConnect(); return 0; }
/* end */
--------------------
find_library: checking for SQLConnect() in -ldb2... -------------------- no
"cc -o conftest -I. -I/usr/lib/ruby/1.8/i486-linux -I. -I/opt/ibm/db2/V9.5/lib32//include -fno-strict-aliasing -g -O2 -fPIC conftest.c -L"." -L"/usr/lib" -L"/opt/ibm/db2/V9.5/lib32//lib" -L. -rdynamic -Wl,-export-dynamic -lruby1.8-static -ldb2 -lpthread -ldl -lcrypt -lm -lc"
conftest.c: In function ‘t’:
conftest.c:3: error: ‘SQLConnect’ undeclared (first use in this function)
conftest.c:3: error: (Each undeclared identifier is reported only once
conftest.c:3: error: for each function it appears in.)
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { void ((*volatile p)()); p = (void ((*)()))SQLConnect; return 0; }
/* end */
"cc -o conftest -I. -I/usr/lib/ruby/1.8/i486-linux -I. -I/opt/ibm/db2/V9.5/lib32//include -fno-strict-aliasing -g -O2 -fPIC conftest.c -L"." -L"/usr/lib" -L"/opt/ibm/db2/V9.5/lib32//lib" -L. -rdynamic -Wl,-export-dynamic -lruby1.8-static -ldb2 -lpthread -ldl -lcrypt -lm -lc"
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { SQLConnect(); return 0; }
/* end */
"cc -o conftest -I. -I/usr/lib/ruby/1.8/i486-linux -I. -I/opt/ibm/db2/V9.5/lib32//include -fno-strict-aliasing -g -O2 -fPIC conftest.c -L"." -L"/usr/lib" -L"/opt/ibm/db2/V9.5/lib32//lib" -L"/home/db2inst1/sqllib/lib" -L. -rdynamic -Wl,-export-dynamic -lruby1.8-static -ldb2 -lpthread -ldl -lcrypt -lm -lc"
conftest.c: In function ‘t’:
conftest.c:3: error: ‘SQLConnect’ undeclared (first use in this function)
conftest.c:3: error: (Each undeclared identifier is reported only once
conftest.c:3: error: for each function it appears in.)
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { void ((*volatile p)()); p = (void ((*)()))SQLConnect; return 0; }
/* end */
"cc -o conftest -I. -I/usr/lib/ruby/1.8/i486-linux -I. -I/opt/ibm/db2/V9.5/lib32//include -fno-strict-aliasing -g -O2 -fPIC conftest.c -L"." -L"/usr/lib" -L"/opt/ibm/db2/V9.5/lib32//lib" -L"/home/db2inst1/sqllib/lib" -L. -rdynamic -Wl,-export-dynamic -lruby1.8-static -ldb2 -lpthread -ldl -lcrypt -lm -lc"
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { SQLConnect(); return 0; }
/* end */
--------------------
What steps is wrong for me? Thanks
|
|
 |