安装作曲家时遇到问题 [英] having trouble installing composer
问题描述
我正在用以下cammand安装作曲家
curl -s https://getcomposer.org/installer | php
但我会不断收到错误讯息 b
$ b
Zafars-MacBook-Pro:etc zafarsaleem $ curl -s https://getcomposer.org/installer | php
#!/ usr / bin / env php
在您的机器上的某些设置使Composer无法正常工作。
确保您修复了下面列出的问题并再次运行此脚本:
detect_unicode设置必须禁用。
将以下内容添加到您的`php.ini'的末尾:
detect_unicode = Off
php.ini文件不存在。您必须创建一个。
如何安装composer删除上述错误?
EDIT
Zafars-MacBook-Pro:etc zafarsaleem $ php --ini
配置文件(php.ini)路径:/ etc
加载配置文件:(无)
扫描其他.ini文件:(无)
解析其他.ini文件: (无)
最新编辑 b $ b
经过一些研究,我发现使用的 php.ini
文件在 /etc/php.ini
。但是,当我检查这个文件在 / etc
文件夹中,它不在那里。 / etc
文件夹包含 php.ini.default
文件夹,链接到 / private / php.ini.default
。所以我在 /etc/php.ini.default
中添加了 detect_unicode = Off
,并将此文件重命名为 php.ini
。现在当我执行下面的命令
curl -s https://getcomposer.org/installer | php
或
sudo curl -s https://getcomposer.org/installer |然后我得到以下错误
<$ p $ p> Zafars-MacBook-Pro:/ zafarsaleem $ sudo curl -s https://getcomposer.org/installer | php
#!/ usr / bin / env php
使用Composer的所有设置正确
下载...
下载失败:无法打开流:权限被拒绝
正在下载...
下载失败:无法打开流:权限被拒绝
下载...
下载失败:无法打开流:权限被拒绝
下载失败,中止。
如何在我的电脑上安装composer并移除上述问题?请帮助
要在MacOSX上下载/安装,您可以执行按照步骤 或尝试自制步骤如下:
-
转到您可以写的目录到:
cd〜
-
get composer:
curl -sS https://getcomposer.org/installer | php
-
将作曲家移至$ PATH var:
sudo mv作曲家的bin目录。 phar / usr / local / bin / composer
-
复制作曲家作品
brew更新
brew tap homebrew / homebrew- php
brew tap homebrew / dupes
brew tap homebrew / versions
brew install php55-intl
brew install homebrew / php / composer
I am installing composer with the following cammand
curl -s https://getcomposer.org/installer | php
But I am keep getting below error message
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.
How can I install composer be removing above error?
EDIT
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)
Latest Edit
After some research I found that php.ini
file which is being used is in /etc/php.ini
. However, when I checked this file in /etc
folder it wasn't there. /etc
folder contained php.ini.default
folder which linked to /private/etc/php.ini.default
. So I added detect_unicode = Off
in /etc/php.ini.default
and the renamed this file to php.ini
. Now when I execute below command
curl -s https://getcomposer.org/installer | php
OR
sudo curl -s https://getcomposer.org/installer | php
Then I get following errors
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.
How can I install composer on my computer and remove above problems? Please help
To download / install on MacOSX, you can do the following steps or try the homebrew steps below:
Goto a directory you can write to:
cd ~
get composer:
curl -sS https://getcomposer.org/installer | php
move composer into a bin directory in your $PATH var:
sudo mv composer.phar /usr/local/bin/composer
double check composer works
composer about
(optional) Update composer:
sudo composer self-update
brew update
brew tap homebrew/homebrew-php
brew tap homebrew/dupes
brew tap homebrew/versions
brew install php55-intl
brew install homebrew/php/composer
这篇关于安装作曲家时遇到问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!