2

I have drush 6.2.0.0 installed (via pear) on a synology NAS (Busybox). When attempting to use drush dl, it fails at the step where the downloaded file is to be untarred (see code box below for --debug messages). I did transiently have it working in April 2013, but have since made some changes to my system, and have been unable to re-produce my working setup.

I have tried all previous stable drush versions back to 5.4.0, with the same problem. If I manually repeat the steps from the cli, everything works fine, so I suspect that it is something to do with version incompatibility with the tar command drush is calling, but have been unable to find a way to get it to work.

drush dl views_raw_sql --debug
BusyBox v1.16.1 (2013-11-06 05:34:06 CST) multi-call binary.

Usage: dirname FILENAME

Strip non-directory suffix from FILENAME

Bootstrap to phase 0. [0.01 sec, 2.37 MB]                            [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drush() [0.02 sec, 2.49 MB] [bootstrap]
Cache HIT cid: 6.2.0-commandfiles-0-13d519746b450041a028af739ac40466 [0.03 sec, 2.5 MB]                                                                                               [debug]
Bootstrap to phase 0. [0.3 sec, 5.76 MB]                                                                                                                                          [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.49 sec, 5.76 MB]                                                                                                        [bootstrap]
Initialized Drupal 7.24 root directory at /web/rooms [0.53 sec, 6.69 MB]                                                                                                             [notice]
Drush bootstrap phase : _drush_bootstrap_drupal_site() [0.53 sec, 6.7 MB]                                                                                                         [bootstrap]
Initialized Drupal site default at sites/default [0.54 sec, 6.7 MB]                                                                                                                  [notice]
Cache HIT cid: 6.2.0-install_profile-66ecfeb9791a023150773849f1550c5d [0.54 sec, 6.7 MB]                                                                                              [debug]
Cache HIT cid: 6.2.0-commandfiles-2-699657487b88e8b0c2ede2984aa12913 [0.54 sec, 6.7 MB]                                                                                               [debug]
Drush bootstrap phase : _drush_bootstrap_drupal_configuration() [0.55 sec, 6.7 MB]                                                                                                [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_database() [0.56 sec, 6.71 MB]                                                                                                    [bootstrap]
Successfully connected to the Drupal database. [0.56 sec, 6.71 MB]                                                                                                                [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_full() [0.58 sec, 7.16 MB]                                                                                                        [bootstrap]
Cache HIT cid: 6.2.0-install_profile-66ecfeb9791a023150773849f1550c5d [1.21 sec, 23.47 MB]                                                                                            [debug]
Cache HIT cid: 6.2.0-commandfiles-5-bbe78d7a9b386ee3452d706cd9cfae92 [1.22 sec, 23.48 MB]                                                                                             [debug]
Drush bootstrap phase : _drush_bootstrap_drupal_login() [1.23 sec, 23.79 MB]                                                                                                      [bootstrap]
Successfully logged into Drupal as Anonymous (uid=0) [1.25 sec, 23.96 MB]                                                                                                         [bootstrap]
Found command: pm-download (commandfile=pm) [1.25 sec, 23.96 MB]                                                                                                                  [bootstrap]
Loading version_control engine. [1.76 sec, 24.14 MB]                                                                                                                                 [notice]
Loading package_handler engine. [1.77 sec, 24.15 MB]                                                                                                                                 [notice]
Executing: wget --version
Loading release_info engine. [1.79 sec, 24.18 MB]                                                                                                                                    [notice]
Including /usr/syno/php/share/pear/drush/commands/pm/download.pm.inc [1.81 sec, 24.28 MB]                                                                                         [bootstrap]
Calling hook drush_pm_download_validate [1.81 sec, 24.36 MB]                                                                                                                          [debug]
Returned from hook drush_pm_download_validate [1.81 sec, 24.36 MB]                                                                                                                    [debug]
Calling hook drush_pm_download [1.81 sec, 24.37 MB]                                                                                                                                   [debug]
Downloading release history from http://updates.drupal.org/release-history/views_raw_sql/7.x [1.82 sec, 24.37 MB]                                                                    [notice]
Executing: wget --version
  GNU Wget 1.10.1

  Copyright (C) 2005 Free Software Foundation, Inc.
  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  Originally written by Hrvoje Niksic <[email protected]>.
Executing: wget -q --timeout=30 -O /tmp/download_file6l316N http://updates.drupal.org/release-history/views_raw_sql/7.x
Calling drush_delete_dir(/tmp/views_raw_sql7H5oRi, 1) [2.48 sec, 24.37 MB]                                                                                                            [debug]
Calling is_readable(/tmp/download_file6l316N) [2.49 sec, 24.37 MB]                                                                                                                    [debug]
Calling is_writable(/tmp) [2.49 sec, 24.37 MB]                                                                                                                                        [debug]
Calling rename(/tmp/download_file6l316N, /tmp/views_raw_sql7H5oRi) [2.49 sec, 24.37 MB]                                                                                               [debug]
Downloading project views_raw_sql to /tmp/drush_tmp_1386803829_52a8f27534ca9 ... [2.49 sec, 24.38 MB]                                                                                [notice]
Executing: wget -q --timeout=30 -O /tmp/download_filebSRmyk http://ftp.drupal.org/files/projects/views_raw_sql-7.x-1.0-rc1.tar.gz
Calling is_readable(/tmp/download_filebSRmyk) [3.02 sec, 24.38 MB]                                                                                                                    [debug]
Calling is_writable(/tmp/drush_tmp_1386803829_52a8f27534ca9) [3.02 sec, 24.38 MB]                                                                                                     [debug]
Calling rename(/tmp/download_filebSRmyk, /tmp/drush_tmp_1386803829_52a8f27534ca9/views_raw_sql-7.x-1.0-rc1.tar.gz) [3.02 sec, 24.38 MB]                                               [debug]
Downloading views_raw_sql-7.x-1.0-rc1.tar.gz was successful. [3.02 sec, 24.38 MB]                                                                                                    [notice]
Calling md5_file(/tmp/drush_tmp_1386803829_52a8f27534ca9/views_raw_sql-7.x-1.0-rc1.tar.gz) [3.02 sec, 24.38 MB]                                                                       [debug]
Md5 checksum of views_raw_sql-7.x-1.0-rc1.tar.gz verified. [3.02 sec, 24.38 MB]                                                                                                      [notice]
Mime type for /tmp/drush_tmp_1386803829_52a8f27534ca9/views_raw_sql-7.x-1.0-rc1.tar.gz is application/x-gzip [3.03 sec, 24.38 MB]                                                    [notice]
Calling chdir(/tmp/drush_tmp_1386803829_52a8f27534ca9) [3.03 sec, 24.38 MB]                                                                                                           [debug]
Executing: tar -C /tmp/drush_tmp_1386803829_52a8f27534ca9 -xzf views_raw_sql-7.x-1.0-rc1.tar.gz
/usr/local/php/bin/tar: 2>&1: Not found in archive
/usr/local/php/bin/tar: Exiting with failure status due to previous errors
Calling chdir(/volume1/web/rooms) [3.04 sec, 24.39 MB]                                                                                                                                [debug]
Unable to untar /tmp/drush_tmp_1386803829_52a8f27534ca9/views_raw_sql-7.x-1.0-rc1.tar.gz. [3.04 sec, 24.39 MB]                                                                    [error]
Using destination directory sites/all/modules [3.04 sec, 24.39 MB]                                                                                                                   [notice]
Verifying signature for svn version control engine. [3.04 sec, 24.39 MB]                                                                                                              [debug]
Executing: svn info sites/all/modules
sh: /usr/local/php/bin/svn: not found
Verifying signature for bzr version control engine. [3.05 sec, 24.4 MB]                                                                                                               [debug]
Executing: bzr root sites/all/modules
sh: /usr/local/php/bin/bzr: not found
Calling _drush_recursive_copy(/tmp/drush_tmp_1386803829_52a8f27534ca9/views_raw_sql, sites/all/modules/views_raw_sql) [3.06 sec, 24.39 MB]                                            [debug]
copy(/tmp/drush_tmp_1386803829_52a8f27534ca9/views_raw_sql): failed to open stream: No such file or directory filesystem.inc:257 [3.06 sec, 24.39 MB]                             [warning]
Project views_raw_sql (7.x-1.0-rc1) could not be downloaded to sites/all/modules/views_raw_sql. [3.06 sec, 24.39 MB]                                                              [error]
Returned from hook drush_pm_download [3.06 sec, 24.39 MB]                                                                                                                             [debug]
Command dispatch complete [3.06 sec, 24.37 MB]                                                                                                                                       [notice]
 Timer  Cum (sec)  Count  Avg (msec)
 page   2.514      1      2514.15
Peak memory usage was 25.5 MB [3.07 sec, 24.37 MB]                                                                                                                                   [memory]

2 Answers 2

5

Since there is no solution accepted and I had spent hours figuring it out. First I ran the drush command with the debug option to see what's the problem.

drush dl entity --debug 

I knew that drush could not untar and it needed bsdtar.exe file on windows. I downloaded bsdtar.exe from Google code bsdtar.exe from Google Code I downloaded it and set the path to it, see imageSet path variable in Windows. I tried the drush command again and it worked.

2
  • For Windows this seems to be the correct answer, thanks!
    – fietserwin
    Apr 8, 2016 at 19:02
  • Sorry but I didn't understand how to set up bsdtag.exe in the windows path, can you be more specific please?
    – Shyghar
    Apr 22, 2017 at 10:54
1

It looks like, for some reason, your drush is looking for the tar binary in

/usr/local/php/bin/tar

it should be something like:

/bin/tar

Maybe you've done something funky with your environment variable PATH configuration. You can echo $PATH to test.

If you can't figure out why the path to tar is wrong, a workaround would be to symlink /usr/local/php/bin/tar to /bin/tar (assuming the latter is present)

To locate tar, type

whereis tar

Then you could create a symlink from the one drush is trying to use to the actual tar binary

e.g:

sudo mkdir -p /usr/local/php/bin
sudo ln -s /bin/tar /usr/local/php/bin/tar
2
  • which tar may also work, if tar can be invoked directly.
    – Mołot
    Dec 12, 2013 at 9:35
  • drush appears to expect shell commands (like tar) to be at /usr/local/php/bin/ and I haven't been able to figure out how to change this. I have two different versions of tar on my system (/bin/tar and /opt/bin/tar), and I have already tried making a symlink to one (at a time) of them as you suggested, but it does not work. Drush checks the version of wget, but does not seem to with tar, so I'm not sure which version is being called, and why it fails.
    – ian
    Dec 12, 2013 at 11:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.