laravel - Ubuntu 为 laravel 项目安装 rdkafka
问题描述
我需要在 Ubuntu 20 上为 Laravel 项目安装 rdkafka。我rdkafka
从一些教程安装,包括This Question。当我运行composer update
或composer install
在终端中我看到这个错误
PHP Warning: PHP Startup: rdkafka: Unable to initialize module
Module compiled with module API=20200930
PHP compiled with module API=20190902
These options need to match
in Unknown on line 0
的输出 ls -la /etc/alternatives/php*
是:
lrwxrwxrwx 1 root root 15 Sep 29 12:19 /etc/alternatives/php -> /usr/bin/php7.4
lrwxrwxrwx 1 root root 31 Sep 29 12:19 /etc/alternatives/php.1.gz -> /usr/share/man/man1/php7.4.1.gz
lrwxrwxrwx 1 root root 27 Nov 26 2020 /etc/alternatives/php-config -> /usr/bin/php-config.default
lrwxrwxrwx 1 root root 43 Nov 26 2020 /etc/alternatives/php-config.1.gz -> /usr/share/man/man1/php-config.default.1.gz
lrwxrwxrwx 1 root root 18 Sep 29 12:20 /etc/alternatives/phpize -> /usr/bin/phpize7.4
lrwxrwxrwx 1 root root 34 Sep 29 12:20 /etc/alternatives/phpize.1.gz -> /usr/share/man/man1/phpize7.4.1.gz
我怎样才能解决这个问题?
解决方案
推荐阅读
- typescript - 打字稿在界面上使用省略
- python - 根据来自 2nd DataFrame 的条件,从 1 DataFrame 中选择一个值,并将该值粘贴到第一个 DataFrame 中的新列
- c# - 检查消息插入到 Azure 队列的状态
- c# - 使用 Linq 方法语法的左连接
- .net - 将服务器从 2012 升级到 2019 后,Web Socket 不适用于实际设备
- java - springboot 微服务中的专用身份验证服务
- typescript - 构建一个类型安全的装饰器
- css - 如何删除网格内列表之后的间隙?
- hyperlink - 如何使用剑道面板栏打开一个新的链接标签
- postgresql - 无法通过修订 ID 回滚特定的 Alembic 迁移