0

My composer version is 1.9.0

I am trying to install drush . but got some error.

composer global require drush/drush:dev-master

Output :

Changed current directory to /root/.config/composer

[Composer\Downloader\TransportException] The "https://repo.packagist.org/packages.json" file could not be downloaded: Failed to enable crypto failed to open stream: operation failed

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

enter image description here

When I run composer diagnose

Output : enter image description here

Arif
  • 195
  • 12
  • With what version of Drupal are you working? Drupal 8, then Drush must be required as local dependency. – leymannx Sep 23 '19 at 07:39
  • Yes Drupal 8 , trying to install drush at some server – Arif Sep 23 '19 at 07:42
  • See https://docs.drush.org/en/master/install/: `Drush only supports one install method. It requires that your Drupal site be built with Composer and Drush be listed as a dependency.` – leymannx Sep 23 '19 at 07:52
  • composer global require drush/drush also same error – Arif Sep 23 '19 at 09:07
  • `$ cd path/to/my/drupal-project && composer require drush/drush && vendor/drush/drush/drush status` – leymannx Sep 23 '19 at 09:43
  • `[Composer\Downloader\TransportException] The "https://packages.drupal.org/8/packages.json" file could not be downloaded: Failed to enable crypto failed to open stream: operation failed` I am running after going my project directory.. It may be server proxy issue – Arif Sep 23 '19 at 09:54
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/199830/discussion-between-arif-and-leymannx). – Arif Sep 23 '19 at 10:03
  • 1
    It seems an ssl issue, check your certificates `php -r 'var_dump(openssl_get_cert_locations());'` and tell composer where to find them `composer config --global cafile '/path/to/cert'` – EricLavault Sep 23 '19 at 10:05
  • same issue after set cafile path of composer – Arif Sep 23 '19 at 10:09
  • check 2nd screen sort .. here some proxy issue come. it may server proxy issue – Arif Sep 23 '19 at 10:10
  • 1
    Some antivirus can intercept traffic and falsely report problems with package downloads. Did you try to disable it ? – EricLavault Sep 23 '19 at 10:17
  • Possible duplicate of [Composer update fails while updating from packagist](https://stackoverflow.com/questions/27206719/composer-update-fails-while-updating-from-packagist) – β.εηοιτ.βε Sep 23 '19 at 18:46

0 Answers0