嗨,我有一个大问题,我有一个VPS上安装了centos。 但我有一个脚本,需要php zip库,我检查了php.net它说:“为了使用这些function,你必须使用–enable-zipconfiguration选项编译PHP的zip支持。 我有PHP版本5.2,请指导我如何去做?
在命令行:
wget [link to php goes here] tar -xvf [file you downloaded goes here] cd [name of file without the extension\folder that was just extracted to] ./configure --enable-zip make make install
在方便的批处理forms中,您应该能够复制和粘贴:
yum install -y make wget gcc zip-devel bzip2-devel wget http://us3.php.net/get/php-5.2.14.tar.gz/from/this/mirror tar -xvf php-5.2.14.tar.gz cd php-5.2.14 ./configure --enable-zip make make install
configuration可能会失败 – 如果你最喜欢需要devel库什么是缺less(看看输出)。如果是bzip例如你可以使用命令
yum install bzip-devel
你的情况可能是这样的
yum install zip-devel
如果上述不起作用,这应该给你一个你需要什么的概念。
yum search zip
这样做后,只需继续在上面的configuration步骤失败(如果它失败的第一个itme通过)。