Skip to content

Instantly share code, notes, and snippets.

@palpalani
Created July 12, 2020 03:39
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save palpalani/641947f642c2bd27c888256e3f77a202 to your computer and use it in GitHub Desktop.
Save palpalani/641947f642c2bd27c888256e3f77a202 to your computer and use it in GitHub Desktop.
Installing ev, event and libevent for PHP 7.4 on Ubuntu 20.04
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
@Vladislavik
Copy link

Vladislavik commented Jun 17, 2022

pecl-event-libevent not installing with this instruction, many errors when do make command

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment