Fatal error "Cannot redeclare template_preprocess_select()" on every attempt to install modules or themes Fatal error: Cannot redeclare template_preprocess_select() (previously declared in /Users/ron/Sites/provgmc.dev/core/includes/form.inc:30) in /Users/ron/sites/provgmc.dev/core/includes/form.inc on line 37


This is not an issue with code I've written or altered. I'm just trying to install a theme using the user interface. I tried Bootstrap and Zymphonies, then a simple module or two; they give the same error when trying to install them.

I am using Drupal 8.2.6, running on Mac OS X Sierra, with PHP 5.6.28. I am not using OPCache, and there are no changes from Mac OS pre-installed versions.

I've used Drupal 7 (under El Capitan) in the past, and I have never had any issues like this.
Mac OS X should have any of these possible reasons:


Your site folder name is mixed case
You cd'd into your site folder name with the wrong case i.e. cd ~/sites/myproject instead of cd ~/Sites/myproject
Your groups are incorrect (use staff not wheel)
Drush is using a different version of PHP from MAMP (Check the output of php --version.)


If you get a redeclare error running drush cc all, check one of the above issues. If sudo drush cc all does not produce the error, it could be one of them. In my case, changing the case of my project from ~/Sites/MyProject to ~/Sites/myproject made the issue go away.

For more in-depth discussion, see:


https://www.drupal.org/node/1305254
https://www.drupal.org/node/1296594