Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I get the following errors.
PHP Fatal error: Cannot redeclare drush_core_rsync() (previously declared in /usr/share/php/drush/commands/core/rsync.core.inc:17) in /usr/share/drush/commands/core/rsync.core.inc on line 62
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Cannot redeclare drush_core_rsync() (previously declared in /usr/share/php/drush/commands/core/rsync.core.inc:17) in /usr/share/drush/commands/core/rsync.core.inc, line 62
Comments
Comment #1
moshe weitzman CreditAttribution: moshe weitzman commentedLooks like you gave remnants of an old drush lying around. i would remove /guest-130325 guest-130325 /usr/share/drush or /guest-130325 /usr/share/php/drush.
Comment #2
P2790 CreditAttribution: P2790 commentedThat is initially what I thought after googling the problem.
I do not have any directories under /guest-130325.
I don't think I've quite understood what you've said. How would I remove this stuff? Am I removing users or directories?
Thanks for your time
Comment #3
greg.1.anderson CreditAttribution: greg.1.anderson commentedrm -rf /usr/share/php/drush
- or -
rm -rf /usr/share/drush
or do both, and then re-install Drush. To be save, you might want to 'mv' instead of 'rm'. Drush will look for global command files in /usr/share/drush/commands, so it would be a bad idea to install drush at /usr/share/drush. (include_once will probably save you if you do this, but it still gives me pause.)
Comment #4
P2790 CreditAttribution: P2790 commentedThanks for your help!
Comment #6
raj45 CreditAttribution: raj45 at DBC commentedI agree with @greg.1.anderson, use
mv
rather thanrm
. I usedrm
and got the message-su: alias: drush: not found
when I tried to log in again. Luckily I could recover the/usr/share/drush
directory, leave it as it was, and install a fresh Drush 8.0.3.