I'm just trying to use Drush with Backdrop for the first time. Most of the commands seem to be working for me, but when I try to download a module I get the following error:

drush dl rabbit_hole

  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of /Users/timothyerickson/Sites/rivertonb/modules/rabbit_hole.zip or
        /Users/timothyerickson/Sites/rivertonb/modules/rabbit_hole.zip.zip, and cannot find /Users/timothyerickson/Sites/rivertonb/modules/rabbit_hole.zip.ZIP, period.

    Error:  Project rabbit_hole could not be found.

The following drush commands all work fine:

  • drush cc all
  • drush cron
  • drush st

 

Most helpful answers

Hello @stpaultim.

Under the hood drush uses the unzip program to expand the *.zip files that drush downloads.

The error you are receiving looks to be a problem with that part of the process.

I just downloaded rabbit_hole with drush fine on my computer so i'm guessing there is a configuration or software difference between our two computers.

Here is what I have:

geoff@yep lando-backdrop exit code: [0] $ lando.dev drush --version
 Drush Version   :  8.1.16


geoff@yep backdrop exit code: [0] $ lando.dev ssh -c "unzip -v"
UnZip 6.00 of 20 April 2009, by Debian. Original by Info-ZIP.

Latest sources and executables are at ftp://ftp.info-zip.org/pub/infozip/ ;
see ftp://ftp.info-zip.org/pub/infozip/UnZip.html for other sites.

Compiled with gcc 4.9.2 for Unix (Linux ELF) on Jan 28 2017.

One thing I use to mitigate machine difference is I run my apps in Lando so that I know each backdrop app will have the right tools available to it, php, extensions, unzip, os etc.

 

So, I can recommend Lando otherwise if we can identify a difference in your machine config we can probably sort it out.  I start by checking that you have unzip and what version.

Comments

Hello @stpaultim.

Under the hood drush uses the unzip program to expand the *.zip files that drush downloads.

The error you are receiving looks to be a problem with that part of the process.

I just downloaded rabbit_hole with drush fine on my computer so i'm guessing there is a configuration or software difference between our two computers.

Here is what I have:

geoff@yep lando-backdrop exit code: [0] $ lando.dev drush --version
 Drush Version   :  8.1.16


geoff@yep backdrop exit code: [0] $ lando.dev ssh -c "unzip -v"
UnZip 6.00 of 20 April 2009, by Debian. Original by Info-ZIP.

Latest sources and executables are at ftp://ftp.info-zip.org/pub/infozip/ ;
see ftp://ftp.info-zip.org/pub/infozip/UnZip.html for other sites.

Compiled with gcc 4.9.2 for Unix (Linux ELF) on Jan 28 2017.

One thing I use to mitigate machine difference is I run my apps in Lando so that I know each backdrop app will have the right tools available to it, php, extensions, unzip, os etc.

 

So, I can recommend Lando otherwise if we can identify a difference in your machine config we can probably sort it out.  I start by checking that you have unzip and what version.

Thanks. I may try Lando (I am using it for Drupal 8 development), but I would also like to make a small effort to get this working in my native Mac Environment where I do all my Drupal 7 development. I am able to drush dl <modules> for D7 without any problems. 

I went through the process of installing the Backdrop command in Drush again. 

>> pwd
/Users/testuser/.drush/commands/backdrop
>> ls -lash
total 176
 0 drwxr-xr-x@ 11 testuser  staff   374B Jan 22 14:12 ./
 0 drwxr-xr-x   8 testuser  staff   272B Jul 22 17:25 ../
 8 -rwxr-xr-x@  1 testuser  staff     7B Jan 22 14:12 .gitignore*
48 -rwxr-xr-x@  1 testuser  staff    24K Jan 22 14:12 BackdropBoot.php*
40 -rwxr-xr-x@  1 testuser  staff    18K Jan 22 14:12 LICENSE.txt*
 8 -rwxr-xr-x@  1 testuser  staff   2.7K Jan 22 14:12 README.md*
56 -rwxr-xr-x@  1 testuser  staff    24K Jan 22 14:12 backdrop-drush-extension-logopn.png*
16 -rwxr-xr-x@  1 testuser  staff   4.3K Jan 22 14:12 backdrop.drush.inc*
 0 drwxr-xr-x@  9 testuser  staff   306B Jan 22 14:12 commands/
 0 drwxr-xr-x@  5 testuser  staff   170B Jan 22 14:12 grn/
 0 drwxr-xr-x@  6 testuser  staff   204B Jan 22 14:12 includes/

Here is some info about my set-up. 

>> unzip --version
caution:  both -n and -o specified; ignoring -o
UnZip 6.00 of 20 April 2009, by Info-ZIP.  Maintained by C. Spieler.

>> which unzip
/usr/bin/unzip

>> wget --version
GNU Wget 1.18 built on darwin15.5.0.

>> drush st
 Backdrop version         :  1.10.0
 Site URI                 :  http://testsite
 Database driver          :  mysql
 Database hostname        :  127.0.0.1
 Database username        :  root
 Database name            :  testsite
 Backdrop bootstrap       :  Successful
 PHP executable           :  /usr/bin/php
 PHP configuration        :  /etc/php.ini
 PHP OS                   :  Darwin
 Drush script             :  /Users/testuser/.composer/vendor/drush/drush/drush.php
 Drush version            :  8.1.11
 Backdrop Drush           :  1.x-0.x
 Drush temp directory     :  /tmp
 Drush configuration      :
 Drush alias files        :  /Users/testuser/.drush/pantheon.aliases.drushrc.php
 Install profile          :  standard
 Backdrop Settings File   :  ./settings.php

>> which drush
/Users/testuser/.composer/vendor/bin/drush

>> pwd
/Users/testuser/Sites/testsite

>> drush dl addressfield
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of /Users/testuser/Sites/testsite/modules/addressfield.zip or
        /Users/testuser/Sites/testsite/modules/addressfield.zip.zip, and cannot find /Users/testuser/Sites/testsite/modules/addressfield.zip.ZIP, period.

    Error:  Project addressfield could not be found.


 

 

My colleague installed a Backdrop site on his Mac, with Drush 8 and the Drush Backdrop commands and was immediately able to download modules without any trouble. 

I installed a new fresh version of Backdrop, reinstalled drush8, and reinstalled the Backdrop Drush commands as per = https://backdropcms.org/news/dealing-drush

This is a slightly different setup than I had before. Still exactly the same results. No luck.

 

@stpaultim try and see if this downloads for you without drush

wget --quiet -O https://github.com/backdrop-contrib/webform/releases/download/1.x-4.17.1/webform.zip

that -O part is a capital letter Oh;

 

If this doesn't work then we now the problem is the version of wget on your machine. If it works will take it from there. More data!

I think this was helpful.

If I run the command exactly as you suggest, I get:

>> wget --quiet -O https://github.com/backdrop-contrib/webform/releases/download/1.x-4.17.1/webform.zip
wget: missing URL
Usage: wget [OPTION]... [URL]...

Try `wget --help' for more options.

If I modify it like this (add the '-'):

>> wget -v -O - https://github.com/backdrop-contrib/webform/releases/download/1.x-4.17.1/webform.zip

--2018-07-25 02:04:30--  https://github.com/backdrop-contrib/webform/releases/download/1.x-4.17.1/webform.zip
Resolving github.com (github.com)... 192.30.253.113, 192.30.253.112
Connecting to github.com (github.com)|192.30.253.113|:443... connected.
ERROR: cannot verify github.com's certificate, issued by ‘CN=DigiCert SHA2 Extended Validation Server CA,OU=www.digicert.com,O=DigiCert Inc,C=US’:
  Unable to locally verify the issuer's authority.
To connect to github.com insecurely, use `--no-check-certificate'.

If I remove the "-O" and add "--no-check-certificate" it downloads the file:

>> wget -v - https://github.com/backdrop-contrib/webform/releases/download/1.x-4.17.1/webform.zip --no-check-certificate

So, it looks like the version of wget on your machine does not support the -O flag. I'd suggest upgrading wget.

If it was installed with brew that could be as simple as:

brew upgrade wget

if it is installed some other way you'll need to figure out how to upgrade that. You can check with the command:

brew list

If wget is in the list then the brew upgrade will work.

 

what do you know, i was asking this on twitter and here we are.