0

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

Error Screenshot: enter image description here

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

enter image description here

Hemant Kumar
  • 1,025
  • 15
  • 32
  • Why are you going into this directory `cd php-7.4.33/ext/pcntl/` ?. If its a clean php install then jiust go into `cd php-7.4.33`. Are what do you want to do here? – Foobar Nov 24 '22 at 11:38
  • Ok, i have read this link above. But in the comments of the solution you tried someone has the same issue. Ther must be a better way. I have a look. – Foobar Nov 24 '22 at 11:41
  • @Foobar I have tried many way but none seems to working. – Hemant Kumar Nov 24 '22 at 11:46
  • Try a full complie with options, look here: https://stackoverflow.com/a/64205992/19625365 – Foobar Nov 24 '22 at 11:51

0 Answers0