我正在尝试使用以下命令安装composer php:
curl -s https://getcomposer.org/installer | php
我得到这个错误:
PHP Warning: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0 #!/usr/bin/env php Some settings on your machine may cause stability issues with Composer. If you encounter issues, try to change the following: Your PHP (5.3.2-1ubuntu4.18) is quite old, upgrading to PHP 5.3.4 or higher is recommended. Composer works with 5.3.2+ for most people, but there might be edge case issues. Downloading... Download failed: Unable to access https://getcomposer.org/composer.phar Downloading... Download failed: Unable to access https://getcomposer.org/composer.phar Downloading... Download failed: Unable to access https://getcomposer.org/composer.phar The download failed repeatedly, aborting.
任何想法?
我只是尝试了我的:
[alexus@wcmisdlin02 ~]$ curl -s https://getcomposer.org/installer | php #!/usr/bin/env php Some settings on your machine may cause stability issues with Composer. If you encounter issues, try to change the following: Your PHP (5.3.3) is quite old, upgrading to PHP 5.3.4 or higher is recommended. Composer works with 5.3.2+ for most people, but there might be edge case issues. Downloading... Composer successfully installed to: /home/alexus/composer.phar Use it: php composer.phar [alexus@wcmisdlin02 ~]$ php -v PHP 5.3.3 (cli) (built: Jun 27 2012 14:13:03) Copyright (c) 1997-2010 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies [alexus@wcmisdlin02 ~]$
尝试更新您的PHP包,并再次给它。
看起来像你的一些PHP扩展失踪,这就是我已经安装在我的最后:
[alexus@wcmisdlin02 ~]$ rpm -qa | grep ^php php-mysql-5.3.3-14.el6_3.x86_64 php-pear-1.9.4-4.el6.noarch php-pecl-xhprof-0.9.2-5.el6.x86_64 php-gd-5.3.3-14.el6_3.x86_64 php-pear-Console-Color-1.0.3-1.el6.noarch php-mbstring-5.3.3-14.el6_3.x86_64 php-pdo-5.3.3-14.el6_3.x86_64 php-common-5.3.3-14.el6_3.x86_64 php-soap-5.3.3-14.el6_3.x86_64 phpMyAdmin-3.5.4-1.el6.noarch php-php-gettext-1.0.11-3.el6.noarch php-xml-5.3.3-14.el6_3.x86_64 php-pecl-apc-3.1.9-2.el6.x86_64 php-pear-Console-Table-1.1.4-1.el6.2.noarch php-mcrypt-5.3.3-1.el6.x86_64 php-cli-5.3.3-14.el6_3.x86_64 php-5.3.3-14.el6_3.x86_64 [alexus@wcmisdlin02 ~]$
解决:禁用safe_mode做了诡计!