Composer Cannot Download Files

Composer cannot download files

If you are using composer from behind an HTTP proxy, you can use the standard http_proxy or HTTP_PROXY env vars. Simply set it to the URL of your proxy. Many operating systems already set this variable for you.

eg:

 HTTP_PROXY="http://my-corp-proxy.mcdonalds" php composer.phar install

bonus points if you throw it into your bashrc if your on Linux/OS X or your environment settings for Windows.

To make it easier, you can just export the variable, then you don't have to type it all the time.

 export HTTP_PROXY="http://my-corp-proxy.mcdonalds"
php composer.phar install

Why composer didn't download packages?

How about trying the steps in this article?

http://www.dev-metal.com/composer-problems-try-full-reset/

so

Update Composer itself

composer self-update

Run a diagnostic

composer diagnose

Update your dependencies (note: The -v is the verbose parameter which shows additional info)

composer update -v

If still problems: reinstall the dependencies. Remove the vendor folder (manually) or via rm command (if you are in the project folder, sure) on linux before:

rm -rf vendor/
composer update -v

Composer won't add or even download added libs

Composer said you should install the intl extension (ext-intl), then it means the php extension, not the symfony/intl (as it's limited to en only). You should remove the package and install the real extension. On debian based systems (Ubuntu, ...) it's the package php5-intl

apt-get install php5-intl

Composer does not download

This error is SSL error, if your webserver is Apache, and os is centos 7, you can fixed it by next steps:

  1. Download http://curl.haxx.se/ca/cacert.pem and put it in ~/.cacert

  2. Add php.ini this

    openssl.cafile= ~/.cacert/cacert.pem

  3. Restart your Apache

    systemctl restart httpd.service

How to correct the [Composer\Downloader\TransportException] error for composer

You could also run this command on the CLI before installing any dependencies. It forces composer to use https to download all resources:

composer config -g repo.packagist composer https://packagist.org

composer cannot download mail_mime package

In your composer.json try changining

"pear/mail_mime":"dev-master"

to a stable release for instance 1.10.2 as shown below.

"pear/mail_mime" : "1.10.2"

You should use a specific ( tagged stable at best ) version wherever possible.

Here's more information on how versioning and constraint works in composer.



Related Topics



Leave a reply



Submit