linux下安装php sockets扩展,make时出错,有没有大神帮忙看看 10
/usr/include/php/main/php_network.h:275:error:declarationforparameter‘php_netstream_d...
/usr/include/php/main/php_network.h:275: error: declaration for parameter ‘php_netstream_data_t’ but no such parameter
/usr/include/php/main/php_network.h:219: error: declaration for parameter ‘php_sockaddr_storage’ but no such parameter
/usr/include/php/main/php_network.h:117: error: declaration for parameter ‘php_pollfd’ but no such parameter
/root/php-5.6.8/ext/sockets/conversions.c:1561: error: expected ‘{’ at end of input
make: *** [conversions.lo] Error 1 展开
/usr/include/php/main/php_network.h:219: error: declaration for parameter ‘php_sockaddr_storage’ but no such parameter
/usr/include/php/main/php_network.h:117: error: declaration for parameter ‘php_pollfd’ but no such parameter
/root/php-5.6.8/ext/sockets/conversions.c:1561: error: expected ‘{’ at end of input
make: *** [conversions.lo] Error 1 展开
1个回答
展开全部
在编译PHP时加--enable-sockets参数来启用。编译前用apt-get build-dep php5来解决信赖问题。
./configure --enable-opcache --enable-sockets --prefix=/opt/php --with-apxs2=/usr/bin/apxs2 --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pgsql=/usr --with-tidy=/usr --with-curl=/usr/bin --with-openssl-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-pdo-pgsql=/usr --with-pdo-mysql=mysqlnd --with-xsl=/usr --with-ldap --with-xmlrpc --with-iconv-dir=/usr --with-snmp=/usr --enable-exif --enable-calendar --with-bz2=/usr --with-mcrypt=/usr --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-freetype-dir=/usr --enable-mbstring --enable-zip --with-pear --with-libdir=/lib/x86_64-linux-gnu --with-config-file-path=/opt
./configure --enable-opcache --enable-sockets --prefix=/opt/php --with-apxs2=/usr/bin/apxs2 --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pgsql=/usr --with-tidy=/usr --with-curl=/usr/bin --with-openssl-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-pdo-pgsql=/usr --with-pdo-mysql=mysqlnd --with-xsl=/usr --with-ldap --with-xmlrpc --with-iconv-dir=/usr --with-snmp=/usr --enable-exif --enable-calendar --with-bz2=/usr --with-mcrypt=/usr --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-freetype-dir=/usr --enable-mbstring --enable-zip --with-pear --with-libdir=/lib/x86_64-linux-gnu --with-config-file-path=/opt
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询