我想从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 12.04 LTS
php --version
PHP 5.5.3 (cli) (built: Sep 1 2013 14:29:12)
感谢。
答案 0 :(得分:2)
我认为PHP支持Zlib,但默认情况下不启用Here
当您配置php以启用zlib时,可以添加选项--with-zlib --with-zlib = DIR。
示例:
php_5.6.7 $ ./configure --with-zlib --with-zlib = DIR
感谢,