Search code examples
drupaldrupal-7drush

Module installation using drush giving error


I have downloaded drush and cofigured it properly .Now I am trying to download a module "themekey" and install it to my drupal .Its downloading properly using

drush dl themekey

but when I try to install it using

drush en -y themekey

I get this error

drush en -y themekey
Command pm-enable needs a higher bootstrap level to run - you will   [error]
need to invoke drush from a more functional Drupal environment to run
this command.
The drush command 'en themekey' could not be executed.               [error]
A Drupal installation directory could not be found

Please help me in this , I am new in drpal drush and did not find way to solve this Here is my drupal folder

 /opt/lampp/htdocs/projects/drupal_test/

Solution

  • You need a working drupal installation, meaning php can be executed the mysql server can be reached. Then you have to change into the root directory of your installation - in your case:

    cd /opt/lampp/htdocs/projects/drupal_test/

    and execute the command:

    drush en modulename -y

    For debugging use

    drush rq