2017-04-11 2 views
0

로컬 우분투 환경에 pthread를 설치하려고합니다. 내가 PECL을 사용하여 확장 기능을 설치하려고하면 :pthread를 설치할 수 없습니다.

pecl install pthreads 

나는 다음과 같은 오류 얻을 :

ERROR: `/tmp/pear/temp/pthreads/configure --with-php-config=/usr/bin/php-config' failed

을하지만 설치 한 :

[email protected]:/$ php7.0-zts -v 
PHP 7.0.5-4+donate.sury.org~trusty+1 (cli) (ZTS) 
Copyright (c) 1997-2016 The PHP Group 
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies 

여기 내 전체 출력입니다;

downloading pthreads-3.1.6.tgz ... 
Starting to download pthreads-3.1.6.tgz (80,932 bytes) 
...................done: 80,932 bytes 
28 source files, building 
running: phpize 
Configuring for: 
PHP Api Version:   20151012 
Zend Module Api No:  20151012 
Zend Extension Api No: 320151012 
building in /tmp/pear/temp/pear-build-root5N00Nz/pthreads-3.1.6 
running: /tmp/pear/temp/pthreads/configure --with-php-config=/usr/bin/php-config 
checking for grep that handles long lines and -e... /bin/grep 
checking for egrep... /bin/grep -E 
checking for a sed that does not truncate output... /bin/sed 
checking for cc... cc 
checking whether the C compiler works... yes 
checking for C compiler default output file name... a.out 
checking for suffix of executables... 
checking whether we are cross compiling... no 
checking for suffix of object files... o 
checking whether we are using the GNU C compiler... yes 
checking whether cc accepts -g... yes 
checking for cc option to accept ISO C89... none needed 
checking how to run the C preprocessor... cc -E 
checking for icc... no 
checking for suncc... no 
checking whether cc understands -c and -o together... yes 
checking for system library directory... lib 
checking if compiler supports -R... no 
checking if compiler supports -Wl,-rpath,... yes 
checking build system type... x86_64-unknown-linux-gnu 
checking host system type... x86_64-unknown-linux-gnu 
checking target system type... x86_64-unknown-linux-gnu 
checking for PHP prefix... /usr 
checking for PHP includes... -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib 
checking for PHP extension directory... /usr/lib/php/20151012 
checking for PHP installed headers prefix... /usr/include/php/20151012 
checking if debug is enabled... no 
checking if zts is enabled... no 
checking for re2c... no 
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers. 
checking for gawk... gawk 
checking whether to enable pthreads... yes, shared 
checking whether to enable AddressSanitizer for pthreads... no 
checking whether to enable dmalloc for pthreads... no 
checking for ZTS... configure: error: pthreads requires ZTS, please re-compile PHP with ZTS enabled 
ERROR: `/tmp/pear/temp/pthreads/configure --with-php-config=/usr/bin/php-config' failed 
+2

'오류 : pthreads에는 ZTS가 필요합니다. ZTS를 사용하여 PHP를 다시 컴파일하십시오. '무엇이 질문입니까? –

+0

거기 봐 http://stackoverflow.com/questions/15782860/how-to-install-php-pthreads-extension-on-ubuntu –

+0

하지만 php7.0-zts가 이미 설치되어 있습니다 – Freid001

답변

-1

스레드 안전을 사용하는 PHP를 설치해야합니다. 이 문자열은 그것에 대해 알려줍니다 :

checking for ZTS... configure: error: pthreads requires ZTS, please re-compile PHP with ZTS enabled 

당신은 당신의 시스템에 설치 (ZTS없이) 다른 PHP가있다. 이 php 설치는 pthread를 설치하려고 할 때 사용됩니다.

+0

하지만 php7.0-zts가 이미 설치되어 있습니다. – Freid001

+0

@ Freid001 답변을 업데이트했습니다. –