I tried installing Drush with both methods listed in the drush.org documentation. I think they might be conflicting with each other if that's possible.
When I run
composer global require drush/drush all the components appear to install correctly. However when I change to a Drupal site (Using XAMPP, /opt/lampp/htdocs/sitefolder) and run
drush status I get the following error:
PHP Fatal error: Undefined class constant 'MYSQL_ATTR_SSL_CA' in phar:///usr/local/bin/drush/lib/Drush/Sql/Sqlmysql.php on line 56 Drush command terminated abnormally due to an unrecoverable error.
[error] Error: Undefined class constant 'MYSQL_ATTR_SSL_CA' in phar:///usr/local/bin/drush/lib/Drush/Sql/Sqlmysql.php, line 56
I do have the following line in my ~/.bashrc:
Unfortunately I don't know how to troubleshoot from here, as there doesn't seem to be an easy way to uninstall Drush via the main method (http://docs.drush.org/en/master/install/), which didn't seem to work for me.
composer global remove drush/drush does appear to run successfully.
Thanks in advance.