记录日常工作关于系统运维,虚拟化云计算,数据库,网络安全等各方面问题。
 
0

centos下安装php的ZipArchive扩展

系统:centos6.5 64位系统

下载ZipArchive

wget http://pecl.php.net/get/zip-1.12.4.tgz

解压:

tar zxvf zip-1.12.4.tgz

切换到zip-1.12.4目录一看,没有configure,这怎么编译呢,于是网上一 阵狂搜。后来在意个论坛的一片帖子的回复中有人提到了phpize,我也试着执行了一下phpize命令,提示没有该命令,于是又是一阵狂搜。原来phpize是php.devel带的,于是又安装了php.devel,命令为:

yum -y install php.devel

然后再执行phpize,接着ls一下,果然configure出现了,然后执行:

./configure --with-php-config=/usr/bin/php-config

出现错误,提示缺少zlib什么的,于是执行

yum -y install zlib-devel

进行安装,然后重新

./configure --with-php-config=/usr/bin/php-config

接着make,但是又遇到了错误,提示缺少pcre啥的,于是执行

yum install pcre-devel

然后

make && make install

搞定!



转载请标明出处【centos下安装php的ZipArchive扩展】。

《www.micoder.cc》 虚拟化云计算,系统运维,安全技术服务.

网站已经关闭评论