无法在Cygwin上全局安装composer

时间:2016-05-25 10:23:23

标签: php json xampp composer-php phar

当我运行此命令' php -r" readfile(' https://getcomposer.org/installer');" | PHP'在Cygwin终端上。终端上触发了以下错误:

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 json extension is missing.
Install it or recompile php without --disable-json

The phar extension is missing. 
Install it or recompile php without --disable-phar

The iconv OR mbstring extension is required and both are missing.
Install either of them or recompile php without --disable-iconv

但是,所有这些扩展都在php.ini文件中启用。我正在使用XAMPP。

1 个答案:

答案 0 :(得分:3)

我认为你需要安装正确的php扩展......

apt-cyg install \
php \
php-json \
php-phar \
php-mysql \
php-curl \
php-gd \
php-intl \
php-imap \
php-mcrypt \
php-pspell \
php-recode \
php-tidy \
php-xmlrpc \
php-xsl

PS:我为此创建了一个安装脚本:) https://github.com/voku/dotfiles/blob/master/firstInstallCygwin.sh