Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install Drush on Windows 11 fails #5783

Closed
ulrischa opened this issue Oct 14, 2023 · 3 comments
Closed

Install Drush on Windows 11 fails #5783

ulrischa opened this issue Oct 14, 2023 · 3 comments

Comments

@ulrischa
Copy link

Describe the bug
Installing drush with composer require drush/drush in the drupal directory in htdocs on XAMPP on Windows 11 fails with the message:

ZipDownloader.php line 185:

Failed to extract drush/drush: (2) "C:\Program Files\7-Zip\7z.EXE"

ERROR: Cannot create symbolic link : Dem Client fehlt ein erforderliches Recht.

To Reproduce
Install Drupal (I tried download and extract and install with composer which worked) and then composer require drush/drush

Expected behavior
Drush is installed

Actual behavior
Drush is not installed

System Configuration

Q A
Drush version? 12.x
Drupal version? 10.x
PHP version 8.2
OS? Windows
@weitzman
Copy link
Member

Not a Drush issue

@ulrischa
Copy link
Author

What then?

@Harkonn
Copy link

Harkonn commented Dec 1, 2023

Reading Zip archives are not unpacked correctly in the troubleshooting article of composer i enabled extension=zip in php.ini file.
This helped me get past this error and drush 12.4.3 was installed. Maybe this helps other people in this situation.
I am not sure if a critical symlink is missing, since composer used the ZipArchive class:

  - Installing drush/drush (12.4.3): Extracting archive
 1/4 [=======>--------------------]  25%    Failed to extract drush/drush: (2) "C:\Program Files\7-Zip\7z.EXE" x -bb0 -y C:\xampp\htdo
cs\egovdrupal-1066-3-1\vendor\composer\tmp-9a176ab498aa3cadf154d9dbd2b61a12.zip -oC:\xampp\htdocs\egovdrupal-1066-3-1\vendor\composer\
b01d5fe3

ERROR: Cannot create symbolic link : Dem Client fehlt ein erforderliches Recht. : C:\xampp\htdocs\egovdrupal-1066-3-1\vendor\composer\
b01d5fe3\drush-ops-drush-8245ace\docs\contribute\CONTRIBUTING.md
ERROR: Cannot create symbolic link : Dem Client fehlt ein erforderliches Recht. : C:\xampp\htdocs\egovdrupal-1066-3-1\vendor\composer\
b01d5fe3\drush-ops-drush-8245ace\docs\drush_logo-black.png
ERROR: Cannot create symbolic link : Dem Client fehlt ein erforderliches Recht. : C:\xampp\htdocs\egovdrupal-1066-3-1\vendor\composer\
b01d5fe3\drush-ops-drush-8245ace\docs\img\favicon.ico
ERROR: Cannot create symbolic link : Dem Client fehlt ein erforderliches Recht. : C:\xampp\htdocs\egovdrupal-1066-3-1\vendor\composer\
b01d5fe3\drush-ops-drush-8245ace\docs\misc\icon_PhpStorm.png

    The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems)
    Unzip with 7z command failed, falling back to ZipArchive class

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants