DWQA QuestionsCategory: ServerHow to solve a lot of errors in installing pthreads in Ubuntu??
Grey V touch asked 2 months ago

Environmental Science:

System: ubuntu 16.0.4 LTS x64
PHP: php-7.1.0
MySQL: mysql-5.7.x
Apache: Apache2.4.25

pthreadedition:php_pthreads-3.1.6-7.0-ts-vc14-x64(for php7)
phpOptions at compile install time:

cd phpDir
./configure --with-apxs2=/usr/local/apache2/apxs 
make install

about--enable-maintainer-ztsThe explanation of this paper is as follows:
PHP ZTSIt’s on. This one is onPOSIX header file (pthread. H)I am here/usr/local/include/pthread.hI found it in the library.
about--enable-tsrm-pthreadsThe explanation of this paper is as follows:
Then, I compile and generatepthreads.soHow to file:

Sudo MV pthreads. / phpdir / ext # move the downloaded pthreads to the extension directory under the PHP source code package
cd phpDir/ext/pthreads
Sudo phpize # successfully generated the configure file
Sudo. / configure? Success
Sudo make # failed!
Sudo make install # not executed

sudo makeThere are many compile time errors:
Last error:

Makefile:196: recipe for target 'php_pthreads.lo' failed
make: *** [php_pthreads.lo] Error 1

I have been very helpless. It should be said that the PHP version corresponds to the pthreads version. Then, the various settings should also meet the requirements, that is, I don’t know why they can’t be generated successfullypthreads.so ??
Various additions on the networkAdd pthreads to PHP in UbuntuI’ve seen them all, but I can’t find a solution! Seek a solution!??

1 Answers
Grey V touch answered 2 months ago

The problem has been solved. Download the pthreads extension on GitHub. There is a problem with the extension on PECL’s official websitehttp://pecl.php.net/package/p…

vYao replied 2 months ago

I also have the same problem. My php7.1.3 is also downloaded from GitHub or not. Which version do you download? I downloaded 3.1.6

Grey V touch replied 2 months ago

The current version 3.1.6 requires at least php7.2 +. Your PHP version is too low.
How do you look at the official website description document