I am trying to run php7.4 code as async using package spatie/async
but seems to have problem with PCNTL extension.
I have followed this to install pcntl
extenstion but have error on step:7
Not sure what went wrong.
Resource: https://stackoverflow.com/a/64634134/7284734
I am not sure what went wrong
php -v
sudo wget https://www.php.net/distributions/php-7.4.33.tar.gz
sudo tar xfz php-7.4.33.tar.gz
cd php-7.4.33/ext/pcntl/
sudo phpize
sudo ./configure --with-php-config=/usr/bin/php-config
Step 7:
sudo make && sudo make install
Error:
/home/hemant.kumar/Desktop/php-7.4.33/ext/pcntl/php_signal.c: In function ‘php_signal4’:
/home/hemant.kumar/Desktop/php-7.4.33/ext/pcntl/php_signal.c:53:6: error: void value not ignored as it ought to be
53 | if (zend_sigaction(signo, &act, &oact) < 0) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:210: php_signal.lo] Error 1
Also shows this message:
PHP Warning: PHP Startup: Unable to load dynamic library 'pcntl' (tried: /usr/lib/php/20190902/pcntl (/usr/lib/php/20190902/pcntl: cannot open shared object file: No such file or directory), /usr/lib/php/20190902/pcntl.so (/usr/lib/php/20190902/pcntl.so: cannot open shared object file: No such file or directory)) in Unknown on line 0