Answers.Body: <p>Permissions problem on the folders. As per @luke-stewart in the comments running composer with -vvv helps diagnose such problems.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-11-03T00:55:00.110Z
Answers.LastActivityDate: 2021-11-03T00:55:00.110Z
Answers.UserDisplayName: Demerit
Body: <p>I installed the latest Drupal 9 (9.2.7) using composer as follows:</p>
  <pre><code>composer create-project drupal/recommended-project myDrupal9
  </code></pre>
  <p>That gave me the latest/recommended version (9.2.7)</p>
  <p>I then tried to install civiCRM using <a href="https://civicrm.stackexchange.com/questions/35746/what-is-the-status-of-civicrm-working-with-drupal-9">this</a> instructions (only difference is, version installed = Drupal 9.2.7) that failed with the below errors.</p>
  <pre><code>Installing civicrm/civicrm-core (5.42.1): Extracting archive
  Install of dflydev/apache-mime-types failed
  Install of adrienrn/php-mimetyper failed
  Install of brick/math failed
  Install of brick/money failed
  Install of cache/tag-interop failed
  Install of cache/integration-tests failed
  Install of phpseclib/phpseclib failed
  Install of civicrm/civicrm-cxn-rpc failed
  Install of zetacomponents/base failed
  Install of zetacomponents/mail failed
  
  
  
  Failed to download civicrm/civicrm-drupal-8 from dist: web/modules/contrib/civicrm does not exist and could not be created.
  Now trying to download from source
  unzip:  cannot find or open /var/www/html/myDrupal9/vendor/composer/tmp-efb8b42182d07450c2d7ec823e73087a.
  
  This most likely is due to a custom installer plugin not handling the returned Promise from the downloader
  See https://github.com/composer/installers/commit/5006d0c28730ade233a8f42ec31ac68fb1c5c9bb for an example fix
  unzip:  cannot find or open /var/www/html/myDrupal9/vendor/composer/tmp-1a4503f846ecbbb0aade402b4254eafa.
  
  This most likely is due to a custom installer plugin not handling the returned Promise from the downloader
  See https://github.com/composer/installers/commit/5006d0c28730ade233a8f42ec31ac68fb1c5c9bb for an example fix
  Install of tplaner/when failed
  Failed to extract totten/ca-config: (9) '/usr/bin/unzip' -qq '/var/www/html/myDrupal9/vendor/composer/tmp-2ddb0683b1b57a00b717f6da8788dd9d' -d '/var/www/html/myDrupal9/vendor/composer/49ca8d4b'
  </code></pre>
  <p>I also tried using the main install <a href="https://docs.civicrm.org/installation/en/latest/drupal8/" rel="nofollow noreferrer">page</a> instructions and no luck with similar errors.</p>
  <p>I'm using Drupal 9.2.7 since <a href="https://www.drupal.org/project/drupal/releases/9.1.13" rel="nofollow noreferrer">end of life</a> for 9.1.x series is in few weeks.</p>
  <p>Using: composer version 2.</p>
  <p>PHP 8.0 and MySQL 8.0.</p>
  <p>Anybody got ideas?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-10-31T15:46:15.507Z
Comments.Text: What version of composer? Also check permissions on the folders.
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-10-31T15:53:30.070Z
Comments.Text: using: composer version 2, PHP 8.0 and MySQL 8.0. Permissions are ok both on folder and /tmp
Comments.UserDisplayName: salah-1
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-11-01T00:34:38.200Z
Comments.Text: MySQL version shouldn't matter? (I'm pretty sure anyway - I just installed somewhere with no MySQL/Mariadb to check) . I've just successfully run the following:
Comments.UserDisplayName: Luke Stewart
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-11-01T00:34:48.497Z
Comments.Text: composer create-project drupal/recommended-project myDrupal9
Comments.UserDisplayName: Luke Stewart
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-11-01T00:34:55.563Z
Comments.Text: composer config extra.enable-patching true
Comments.UserDisplayName: Luke Stewart
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-11-01T00:35:10.190Z
Comments.Text: composer require civicrm/civicrm-{core,packages,drupal-8}:'~5.42.1
Comments.UserDisplayName: Luke Stewart
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-11-01T00:36:36.493Z
Comments.Text: This was on a fresh php8 install (I got errors for not having some PHP extensions - so perhaps check you have the required).  Otherwise try again with -v (-vv -vvv) to see if you can get some more illuminating error messages.
Comments.UserDisplayName: Luke Stewart
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-11-01T14:44:05.253Z
Comments.Text: @Luke, thanks for pointing me the right direction. I double checked the permissions and realized the user running the composer command didn't have write perm to /vendor and /web. The install works fine now, and dealing with other required files issues. If you write up answer, i be glad to accept it.
Comments.UserDisplayName: salah-1
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-11-01T15:26:48.990Z
Comments.Text: running composer with verbose (-vvv) was very helpful in spiting out the real errors/warnings
Comments.UserDisplayName: salah-1
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-11-03T00:49:25.267Z
Comments.Text: credit should go to @Demerit ! :)
Comments.UserDisplayName: Luke Stewart
Tags: <drupal-9>
Title: Can't install civiCRM with drupal 9.2.7
ThreadText: # Can't install civiCRM with drupal 9.2.7
  
  (Asked by: username_0 on 2021-10-31)
  
  I installed the latest Drupal 9 (9.2.7) using composer as follows:
  
  ```
  composer create-project drupal/recommended-project myDrupal9
  
  ```
  
  That gave me the latest/recommended version (9.2.7)
  
  I then tried to install civiCRM using [this](https://civicrm.stackexchange.com/questions/35746/what-is-the-status-of-civicrm-working-with-drupal-9) instructions (only difference is, version installed = Drupal 9.2.7) that failed with the below errors.
  
  ```
  Installing civicrm/civicrm-core (5.42.1): Extracting archive
  Install of dflydev/apache-mime-types failed
  Install of adrienrn/php-mimetyper failed
  Install of brick/math failed
  Install of brick/money failed
  Install of cache/tag-interop failed
  Install of cache/integration-tests failed
  Install of phpseclib/phpseclib failed
  Install of civicrm/civicrm-cxn-rpc failed
  Install of zetacomponents/base failed
  Install of zetacomponents/mail failed
  
  Failed to download civicrm/civicrm-drupal-8 from dist: web/modules/contrib/civicrm does not exist and could not be created.
  Now trying to download from source
  unzip:  cannot find or open /var/www/html/myDrupal9/vendor/composer/tmp-efb8b42182d07450c2d7ec823e73087a.
  
  This most likely is due to a custom installer plugin not handling the returned Promise from the downloader
  See https://github.com/composer/installers/commit/5006d0c28730ade233a8f42ec31ac68fb1c5c9bb for an example fix
  unzip:  cannot find or open /var/www/html/myDrupal9/vendor/composer/tmp-1a4503f846ecbbb0aade402b4254eafa.
  
  This most likely is due to a custom installer plugin not handling the returned Promise from the downloader
  See https://github.com/composer/installers/commit/5006d0c28730ade233a8f42ec31ac68fb1c5c9bb for an example fix
  Install of tplaner/when failed
  Failed to extract totten/ca-config: (9) '/usr/bin/unzip' -qq '/var/www/html/myDrupal9/vendor/composer/tmp-2ddb0683b1b57a00b717f6da8788dd9d' -d '/var/www/html/myDrupal9/vendor/composer/49ca8d4b'
  
  ```
  
  I also tried using the main install [page](https://docs.civicrm.org/installation/en/latest/drupal8/) instructions and no luck with similar errors.
  
  I'm using Drupal 9.2.7 since [end of life](https://www.drupal.org/project/drupal/releases/9.1.13) for 9.1.x series is in few weeks.
  
  Using: composer version 2.
  
  PHP 8.0 and MySQL 8.0.
  
  Anybody got ideas?
  
  **Tags:** drupal-9
  
  > **Comments:**
  > **username_1**: What version of composer? Also check permissions on the folders.  
  > **username_0**: using: composer version 2, PHP 8.0 and MySQL 8.0. Permissions are ok both on folder and /tmp  
  > **username_2**: MySQL version shouldn't matter? (I'm pretty sure anyway - I just installed somewhere with no MySQL/Mariadb to check) . I've just successfully run the following:  
  > **username_2**: composer create-project drupal/recommended-project myDrupal9  
  > **username_2**: composer config extra.enable-patching true  
  > **username_2**: composer require civicrm/civicrm-{core,packages,drupal-8}:'~5.42.1  
  > **username_2**: This was on a fresh php8 install (I got errors for not having some PHP extensions - so perhaps check you have the required).  Otherwise try again with -v (-vv -vvv) to see if you can get some more illuminating error messages.  
  > **username_0**: @username_2, thanks for pointing me the right direction. I double checked the permissions and realized the user running the composer command didn't have write perm to /vendor and /web. The install works fine now, and dealing with other required files issues. If you write up answer, i be glad to accept it.  
  > **username_0**: running composer with verbose (-vvv) was very helpful in spiting out the real errors/warnings  
  > **username_2**: credit should go to @username_1 ! :)  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-11-03. Score: 1 | Accepted answer
  
  Permissions problem on the folders. As per @username_2-username_2 in the comments running composer with -vvv helps diagnose such problems.
  
  
  ---
  
  