composer install failed with error:failed to open stream: Operation now in progress

Created on 28 Oct 2016  ·  3Comments  ·  Source: composer/composer

My composer.json:

{
    "require": {
        "fxp/composer-asset-plugin": "~1.1.1"
    }
}

when I run
php -r "readfile('https://packagist.phpcomposer.com/packages.json');" > composer-setup.php PHP Warning: readfile(https://packagist.phpcomposer.com/packages.json): failed to open stream: Operation now in progress in Command line code on line 1
and I run the anthoer code

LiuZeXin:GA xin$ composer global require "fxp/composer-asset-plugin:~1.1.1"
Changed current directory to /Users/xin/.composer
./composer.json has been updated
Loading composer repositories with package information

Installation failed, reverting ./composer.json to its original content.


  [Composer\Downloader\TransportException]
  **The "https://packagist.phpcomposer.com/packages.json" file could not be downloaded: failed to open stream: Operation now in progress**


require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--] [<packages>]...

I think it is about some configure parameters error in php.ini.
I need help.

Most helpful comment

I change the parameter in the php.ini.
default_socket_timeout = 60
It's work for me.

Who can tell me the reason for this problem?

All 3 comments

I change the parameter in the php.ini.
default_socket_timeout = 60
It's work for me.

Who can tell me the reason for this problem?

@liuzexin thaaaanks! I can not believe it worked.

I change the parameter in the php.ini.
default_socket_timeout = 60
It's work for me.

Who can tell me the reason for this problem?

That worked for me as well. Don't mind my response. I'm just trying to put my own footprint in this thread just in case I will encounter it again.

Was this page helpful?
0 / 5 - 0 ratings