【问题标题】:Unable to install composer globally on Cygwin无法在 Cygwin 上全局安装 composer
【发布时间】:2016-09-22 21:21:27
【问题描述】:

当我运行这个命令 '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。

【问题讨论】:

    标签: php json xampp composer-php phar


    【解决方案1】:

    我认为你需要安装正确的 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

    【讨论】:

    • Brilliant.. 不知道你有适合 Cygwin 的味道.. 以及你如何将它放在那里并在完成后将其移除.. 哇。另外,您实际上发现了 Lynx 的用途!
    猜你喜欢
    • 2015-04-16
    • 2012-08-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-09-14
    • 2019-10-23
    • 2014-12-16
    • 2015-02-07
    相关资源
    最近更新 更多