pecl instal ibm_db2 fails

2019-07-05 05:23发布

I need to install ibm_db2 extension for making php connection with db2. So I have used pecl. But it produces error.

$ pecl install ibm_db2

When I run this, the below error occurs.

.....
checking      in /home/db2inst1/sqllib/lib64...
checking      in /home/db2inst1/sqllib/lib32... found
checking for DB2 CLI include files in default path... checking in /home/db2inst1/sqllib... not found
configure: error: Please reinstall the DB2 CLI distribution
ERROR: `/tmp/pear/temp/ibm_db2/configure --with-IBM_DB2=/home/db2inst1/sqllib' failed

Please help.

9条回答
Melony?
2楼-- · 2019-07-05 06:00

You need the APPLICATION DEVELOPMENT TOOLS when you install the client you should have the option to install them.

Check your /home/db2inst1/sqllib/include folder you'll see that you only have asn.h, a boatload of files is missing when you don't have the development tools installed.

Then use /home/db2inst1/sqllib as your install directory.

查看更多
时光不老,我们不散
3楼-- · 2019-07-05 06:01
  1. download ibm_data_server_driver_for_odbc_cli_linuxx64_v97.tar.gz from ibm.com
  2. untar the file into: /opt/ibm/
  3. enter command > pecl install ibm_db2

    When prompted for DB2 Installation Directory, use: /opt/ibm/odbc_cli/clidriver/
查看更多
成全新的幸福
4楼-- · 2019-07-05 06:03

The error is because in the path /home/db2inst1/sqllib not found the include folder.

you must download db2exc_974_LNX_x86_64.tar.gz, uncompress it (e. /otp/ibm/db2)

then install pecl install ibm_db2

DB2 Installation Directory? use this : /opt/ibm/db2

查看更多
登录 后发表回答