我试图按照本教程在我的 Mac 上安装 Symfony2:http: //symfony.com/fr/doc/current/book/installation.html
所以我做了 :curl -s https://getcomposer.org/installer | php
尽管我收到了 PHP 警告,但它似乎有效:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20090626/intl.so' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20090626/intl.so, 9): image not found in Unknown on line 0
为此,我尝试LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/php/extensions/no-debug-non-zts-20090626/
了,但似乎没有帮助。
下一个命令是:sudo php composer.phar create-project symfony/framework-standard-edition /path/to/webroot/Symfony dev-master
输出是:
PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 32 bytes) in phar:///Users/theofidry/composer.phar/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52
PHP Stack trace:
[...]
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 32 bytes) in phar:///Users/theofidry/composer.phar/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52
Call Stack:
[...]
我更改了 php.ini 中的 memory_limit 并重试了最后一个命令,但现在的输出是:
HP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20090626/intl.so' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20090626/intl.so, 9): image not found in Unknown on line 0
#!/usr/bin/env php
All settings correct for using Composer
Downloading...
Could not create file /private/etc/composer.phar: fopen(/private/etc/composer.phar): failed to open stream: Permission denied
Download failed: fopen(/private/etc/composer.phar): failed to open stream: Permission denied
fwrite() expects parameter 1 to be resource, boolean given
Downloading...
Could not create file /private/etc/composer.phar: fopen(/private/etc/composer.phar): failed to open stream: Permission denied
Download failed: fopen(/private/etc/composer.phar): failed to open stream: Permission denied
fwrite() expects parameter 1 to be resource, boolean given
Downloading...
Could not create file /private/etc/composer.phar: fopen(/private/etc/composer.phar): failed to open stream: Permission denied
Download failed: fopen(/private/etc/composer.phar): failed to open stream: Permission denied
fwrite() expects parameter 1 to be resource, boolean given
The download failed repeatedly, aborting.
有人知道如何解决这个烂摊子吗?