$ symfony new blog
symfony美元新博客
It printed me:
我打印:
Uncaught PharException: zlib extension is required for gz compressed .phar file "/usr/local/bin/symfony" in /usr/local/bin/symfony:9
未捕獲的PharException: zlib擴展是gz壓縮的。phar文件“/usr/本地/bin/symfony”在/usr/local/bin/symfony:9。
How I can recompile php 7 with this extension, that I installed from apt-get?
如何通過這個擴展重新編譯php 7,我從apt-get安裝?
1
you dont need to recompile PHP to enable this extension.
您不需要重新編譯PHP來啟用這個擴展。
Make sure you have the zlib library installed.
確保已經安裝了zlib庫。
$ apt-get update && apt-get install libgcrypt11-dev zlib1g-dev
find your ini file:
找到你的ini文件:
$ php --ini
should yield your active configuration file path, heres mine.
應該生成您的活動配置文件路徑,這是我的。
Configuration File (php.ini) Path: /home/matt/.phpbrew/php/php-7.0.3/etc
配置文件(php.ini)路徑:/home/ matt/.phpbrew/php/php/php -7.0.3/etc。
then open the php.ini file and find and enable:
然后打開php。ini文件並查找並啟用:
zlib.output_compression = On
onwards from there, see here for other config settings.
從這里開始,在這里查看其他配置設置。
0
My case was for PHP 5.6 on a BSD machine. I needed to enable the zlib.so extension. This extension uses the libz.so shared library. Even if you enabled the extension, it's possible that it wasn't added to your configuration.
我的例子是在BSD機器上使用PHP 5.6。我需要啟用zlib。所以擴展。這個擴展使用libz。所以共享庫。即使您啟用了擴展,也有可能它沒有添加到您的配置中。
Add this line to /usr/local/etc/php/extensions.ini (or wherever this config file is kept):
將這一行添加到/usr/local/etc/php/extensions。ini(或保存此配置文件的任何地方):
extension=zlib.so
To check if it worked, use:
要檢查它是否有效,請使用:
php -i
And look for the Phar section.
尋找Phar部分。
本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2016/03/18/72073b829646d9a6b1821df8bd5e3d53.html。