首页 > 解决方案 > Ubuntu 为 laravel 项目安装 rdkafka

问题描述

我需要在 Ubuntu 20 上为 Laravel 项目安装 rdkafka。我rdkafka从一些教程安装,包括This Question。当我运行composer updatecomposer 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

我怎样才能解决这个问题?

标签: laravelapache-kafka

解决方案


推荐阅读