Reputation: 147
I want to install rdkafka
Upon running the command as per the instructions: sudo pecl install rdkafka
I have installed pecl using the command:
sudo apt-get install php-pear php-dev
Upvotes: 6
Views: 8190
Reputation: 2964
Quick Install Steps:
Step 1 Install PHP pecl and pear commands:
sudo apt install php-pear
Step 2 Install librdkafka
sudo apt-get install -y librdkafka-dev
Step 3 Install PECL-package
sudo pecl install rdkafka
Step4 Enable PHP-extension in PHP config. Add to php.ini
extension=rdkafka.so
Step 4 Restart apache server
sudo service apache2 restart
Upvotes: 5
Reputation: 2278
Before doing that install librdkafka . linux command sudo apt-get install librdkafka . After that try the same command as you mentioned using pecl. Hope it should work.
For more detail use this link: https://arnaud-lb.github.io/php-rdkafka/phpdoc/book.rdkafka.html
Upvotes: 2