Symfony的: 'zlib的扩展名' 失踪(Symfony: 'zlib

2019-10-22 06:33发布

我想开始与Symfony的,但我甚至无法一个快速浏览......

$ php -r "readfile('http://symfony.com/installer');" > symfony.phar
$ sudo mv symfony.phar /usr/local/bin/symfony
$ chmod a+x /usr/local/bin/symfony

$ symfony 
PHP Fatal error:  Uncaught exception 'PharException' with message 'zlib extension is required for gz compressed .phar file "/usr/local/bin/symfony"' in /usr/local/bin/symfony:9
Stack trace:
#0 /usr/local/bin/symfony(9): Phar::mapPhar('default.phar')
#1 {main}
  thrown in /usr/local/bin/symfony on line 9

Fatal error: Uncaught exception 'PharException' with message 'zlib extension is required for gz compressed .phar file "/usr/local/bin/symfony"' in /usr/local/bin/symfony:9
Stack trace:
#0 /usr/local/bin/symfony(9): Phar::mapPhar('default.phar')
#1 {main}
  thrown in /usr/local/bin/symfony on line 9

我只有基础知识apt-get和不知道如何安装PHP扩展。

我怎么解决这个问题?

Ubuntu的LTS 12.04

php --version
PHP 5.5.3 (cli) (built: Sep  1 2013 14:29:12)

谢谢。

Answer 1:

我认为PHP支持zlib的,但默认情况下不会使这里

您可以添加选项--with-zlib的--with-zlib的= DIR当您配置PHP启用zlib的。

例:

php_5.6.7 $的./configure --with-zlib的--with-zlib的= DIR

谢谢,



文章来源: Symfony: 'zlib extension' missing