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

Created on 1 June 2024, 4 months ago
Updated 15 September 2024, 13 days ago

Problem/Motivation

I have installed D10 in Xampp PHP 8.2. And tried to install Drush using Composer command "composer require drush/drush". It throws an error and aborts the Drush installation in the project. The Drush version is 12.5.

Steps to reproduce

In D10 install Drush using composer.

Failed to extract drush/drush: (2) "C:\Program Files\7-Zip\7z.EXE" x -bb0 -y D:\xampp\htdocs\test\vendo
  r\composer\tmp-1d49dfb937dc41f3e0829579a977a55d -oD:\xampp\htdocs\test\vendor\composer\31afcf3e

  ERROR: Cannot create symbolic link : A required privilege is not held by the client. : D:\xampp\htdocs\
  test\vendor\composer\31afcf3e\drush-ops-drush-4aebed8\docs\contribute\CONTRIBUTING.md
  ERROR: Cannot create symbolic link : A required privilege is not held by the client. : D:\xampp\htdocs\
  test\vendor\composer\31afcf3e\drush-ops-drush-4aebed8\docs\drush_logo-black.png
  ERROR: Cannot create symbolic link : A required privilege is not held by the client. : D:\xampp\htdocs\
  test\vendor\composer\31afcf3e\drush-ops-drush-4aebed8\docs\img\favicon.ico
  ERROR: Cannot create symbolic link : A required privilege is not held by the client. : D:\xampp\htdocs\
  test\vendor\composer\31afcf3e\drush-ops-drush-4aebed8\docs\misc\icon_PhpStorm.png
🐛 Bug report
Status

Needs work

Version

6.0

Component

Base system (internal API)

Created by

🇮🇳India Kumar Ashutosh

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Kumar Ashutosh
  • 🇲🇽Mexico GafgarionMorua Puerto Vallarta

    The error message indicates that your current user does not have the requisite privileges to create symbolic links when inserting Drush with Composer. The lack of privileges could be due to your user account type, or you might be running the command prompt without administrative rights.

    You could try running the operation as an administrator to overcome this error. Below are the steps:

    1. Press the "Windows" key and type "cmd" or "Command Prompt".
    2. From the results, right-click on "Command Prompt" and opt to "Run as administrator" (you might need to confirm or key in a password).
    3. Once inside the command prompt, navigate to your project directory using the cd command (e.g., cd D:\xampp\htdocs\test\).
    4. After that, try running the Composer command once more (composer require drush/drush).

    If you're facing challenges with the manual installation of Drush and other elements of a Drupal development environment, you might consider using DDEV. DDEV is an open-source tool that uses Docker to build a pre-packaged environment containing everything you need for Drupal development.

    With DDEV, you don't have to worry about setting up Apache, Nginx, PHP, MySQL, Solr, or other services. Plus, it comes with Drush and other useful tools preinstalled.

    To install DDEV on your machine, follow the instructions in the official DDEV documentation (https://ddev.readthedocs.io/en/stable/).

  • Status changed to Needs work 4 months ago
  • 🇲🇽Mexico GafgarionMorua Puerto Vallarta
  • 🇮🇳India Kumar Ashutosh

    thanks @GafgarionMorua
    Works fine.

  • 🇮🇳India gawalin

    I am also facing the same issue. Is there a solution other than using DDEV?

  • 🇮🇳India Kumar Ashutosh

    @gawalin
    Use GIt Bash or Windows Powershell Run as administrator. It will work.

Production build 0.71.5 2024