Laravel Homestead Mongo install causing PHP error undefined symbol: php_json_serializable_ce in Unknown on line 0

前端 未结 2 1890
隐瞒了意图╮
隐瞒了意图╮ 2021-02-06 12:10

PHP Warning: PHP Startup: Unable to load dynamic library \'/usr/lib/php/20151012/mongodb.so\' - /usr/lib/php/20151012/mongodb.so: undefined symbol: php_json_

2条回答
  •  长情又很酷
    2021-02-06 12:53

    I had the same problem, I solved it by reverting to an older PECL mongodb version (1.1.9). There was an update to version 1.2.0 on November 29th, which is why the mongo-php-library also got updated to version 1.1.0.

    Here is what I did:

    sudo pecl uninstall mongodb
    sudo pecl install mongodb-1.1.9
    composer update
    

    The pecl commands will show the same warning, but the installation was successfully completed.

    I hope that the mongo-php-library will be fixed soon, so we're not stuck using an older PECL extension.

提交回复
热议问题