I'm trying to install swoole on my machine
first :
pecl install swoole
Then i need a php module
cd swoole
phpize
./configure
make
sudo make install
The script create a swoole.so in my folder, so i add it in my php.ini :
extension=/usr/lib/php/20151012/swoole.so
When i try php -v, i'v got:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/swoole.so' (tried: /usr/lib/php/20151012/swoole.so (/usr/lib/php/20151012/swoole.so: undefined symbol: spl_ce_Countable), /usr/lib/php/20170718//usr/lib/php/20151012/swoole.so.so (/usr/lib/php/20170718//usr/lib/php/20151012/swoole.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 PHP 7.2.13-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Dec 7 2018 08:07:08) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.2.13-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies with Xdebug v2.6.1, Copyright (c) 2002-2018, by Derick Rethans
What is this error : undefined symbol: spl_ce_Countable ?
Thanks a lot.
I had several php versions installed on my machine. But version 7.2 did not have a php-config file.
sudo apt-get install php7.2-dev
this solved my problem
Thanks to @Álvaro González