-
-
Save adrian-green/0ef69a78cb42d32cadff5efec06a4364 to your computer and use it in GitHub Desktop.
Installing ev, event and libevent for PHP 7.4 on Ubuntu 20.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /usr/src/ | |
git clone https://github.com/expressif/pecl-event-libevent.git | |
cd pecl-event-libevent | |
phpize | |
./configure | |
make && sudo make install | |
sudo apt update | |
sudo apt install php7.4-dev libevent-dev | |
# Install extensions | |
sudo pecl install ev | |
sudo pecl install event # at the 'Include libevent OpenSSL support [yes] :' prompt type "no". | |
sudo pecl install libevent | |
# Create configurations | |
echo 'extension=ev.so' | sudo tee /etc/php/7.4/mods-available/ev.ini | |
echo 'extension=event.so' | sudo tee /etc/php/7.4/mods-available/event.ini | |
echo 'extension=libevent.so' | sudo tee /etc/php/7.4/mods-available/libevent.ini | |
# Create symlinks | |
sudo phpenmod -v 7.4 ev | |
sudo phpenmod -v 7.4 event | |
sudo phpenmod -v 7.4 libevent | |
# Check modules are loaded | |
php -m | grep ev |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment