dswsl2016 2015-11-05 21:28
浏览 64
已采纳

PHP没有找到DB2扩展

I have a vagrant box set up for development. It has been running fine for months, but I recently ran vagrant box update since it'd been nagging me to update, and naturally it's now broken.

The problem is with PHP startup. It can't find the DB2 so file:

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20131226/ibm_db2.so' - libdb2.so.1: cannot open shared object file: No such file or directory in Unknown on line 0

However, the file is there:

~$ sudo find / -name '*db2.so'
/usr/lib/php5/20131226/ibm_db2.so

Any idea what's up with this error?

  • 写回答

1条回答 默认 最新

  • dqayok7935 2015-11-16 22:16
    关注

    When I updated my vagrant box the PHP extension was installed correctly but could no longer find the DB2 headers. I had to sudo pecl uninstall ibm_db2 then follow the instructions here to download and install the DB2 headers. Finally I reinstalled the pecl extension using sudo pecl install ibm_db2 and I was back in business.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘