I was running 2.1.8 (or if it was 2.1.9) and decided to upgrade. After some errors (documented at gitHub), I was able to run php bin/magento setup:upgrade. It tells me to run bin/magento setup:di:compile, which I did.
It throws the following error:
Fatal error: Class MagePal\GmailSmtpApp\Model\Transport contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Magento\Framework\Mail\TransportInterface::getMessage) in /opt/bitnami/apps/magento/htdocs/app/code/MagePal/GmailSmtpApp/Model/Transport.php on line 11
I tried clearing the different var-directories (when in my magento-root), with
rm -rf ./var/di/* ./var/view_preprocessed/* ./var/generation/* ./var/composer_home/* ./var/cache/* ./var/page_cache/*
I've reset the permissions of the owner according to the manual at bitnami (this is the image I run, on a Google cloud instance).
I also looked into the transport.php-file. This didn't implement the getMessage()-function. So I used composer to get the latest (composer require magepal/magento2-gmailsmtpapp), I copied the complete folder into the app/code/-directory instead, as it was where I originally had it. Then, I removed it with composer (composer remove magepal/magento2-gmailsmtpapp). I again clean the different var-directories. I then run the magento setup:upgrade-command and magento setup:di:compile-command again. It throws the same error. For reference, the transport.php-file looks like this. This is one solution to the issue, I just messed up the copying (see below answer).
Sometimes, there is also a note about Segmentation fault. However, it seems to disappear after I've runned the setup:di:compile a couple of times, I also read about setting "ulimit -s 65536", it doesn't help.
The only thing I've been able to do, to get it up and running again is to rollback backups into a clean 2.1.9-installation.
Any advice would be very appreciated. Thanks.