我正在使用以下cammand安装composer
curl -s https://getcomposer.org/installer | php
Run Code Online (Sandbox Code Playgroud)
但我一直收到以下错误消息
Zafars-MacBook-Pro:etc zafarsaleem$ curl -s https://getcomposer.org/installer | php
#!/usr/bin/env php
Some settings on your machine make Composer unable to work properly.
Make sure that you fix the issues listed below and run this script again:
The detect_unicode setting must be disabled.
Add the following to the end of your `php.ini`:
detect_unicode = Off
A php.ini file does not exist. You will have to create one.
Run Code Online (Sandbox Code Playgroud)
如何安装composer才能删除上述错误?
编辑
Zafars-MacBook-Pro:etc zafarsaleem$ php --ini
Configuration File (php.ini) Path: /etc
Loaded Configuration File: (none)
Scan for additional .ini files in: (none)
Additional .ini files parsed: (none)
Run Code Online (Sandbox Code Playgroud)
最新编辑
经过一番研究后,我发现php.ini
正在使用的文件是/etc/php.ini
.但是,当我在/etc
文件夹中检查此文件时,它不在那里./etc
文件夹包含php.ini.default
链接到的文件夹/private/etc/php.ini.default
.所以我说detect_unicode = Off
在/etc/php.ini.default
和重命名该文件php.ini
.现在我执行下面的命令
curl -s https://getcomposer.org/installer | php
Run Code Online (Sandbox Code Playgroud)
要么
sudo curl -s https://getcomposer.org/installer | php
Run Code Online (Sandbox Code Playgroud)
然后我得到以下错误
Zafars-MacBook-Pro:/ zafarsaleem$ sudo curl -s https://getcomposer.org/installer | php
#!/usr/bin/env php
All settings correct for using Composer
Downloading...
Download failed: failed to open stream: Permission denied
Downloading...
Download failed: failed to open stream: Permission denied
Downloading...
Download failed: failed to open stream: Permission denied
The download failed repeatedly, aborting.
Run Code Online (Sandbox Code Playgroud)
如何在我的计算机上安装composer并删除上述问题?请帮忙
Mik*_*raf 107
要在MacOSX上下载/安装,您可以执行以下步骤 或尝试以下自制步骤:
转到您可以写入的目录:
cd~
得到作曲家:
curl -sS https://getcomposer.org/installer | PHP
将composer移动到$ PATH var中的bin目录:
sudo mv composer.phar/usr/local/bin/composer
双重检查作曲家的作品
作曲家
(可选)更新作曲家:
sudo作曲家自我更新
brew update
brew tap homebrew/homebrew-php
brew tap homebrew/dupes
brew tap homebrew/versions
brew install php55-intl
brew install homebrew/php/composer
Run Code Online (Sandbox Code Playgroud)
And*_*yco 30
请尝试此操作并动态更改设置,仅适用于此命令
curl -sS https://getcomposer.org/installer | php -d detect_unicode=Off
Run Code Online (Sandbox Code Playgroud)
小智 5
在Ubuntu Vivid 15.04中.尝试:步骤:
注意:对不起,我的英文不好:(
归档时间: |
|
查看次数: |
48985 次 |
最近记录: |