I recently migrated an inherited site to a Digital Ocean VPS (LAMP, PHP 7.2, Craft 3.4.9). When I visit /admin/utilities/system-report I receive the following error: Class 'Imagine\Gd\Imagine' not found. Attempting to upload an image results in the same error. Existing assets are fine on the front-end but cannot be edited and thumbnails are not being displayed in the CP.
PHP info reports that both gd and imagick are enabled.
I've tried adding the drivers to general.php ('imageDriver' => 'gd' and 'imageDriver' => 'imagick') without success. Interestingly, there are two other Craft sites on the server that are working as expected -- the setup of all three are identical.
Stack trace follows.
Error: Class 'Imagine\Gd\Imagine' not found in /var/www/[redacted]/vendor/craftcms/cms/src/utilities/SystemReport.php:98
Stack trace:
#0 /var/www/[redacted]/vendor/craftcms/cms/src/utilities/SystemReport.php(75): craft\utilities\SystemReport::_appInfo()
#1 /var/www/[redacted]/vendor/craftcms/cms/src/controllers/UtilitiesController.php(85): craft\utilities\SystemReport::contentHtml()
#2 [internal function]: craft\controllers\UtilitiesController->actionShowUtility('system-report')
#3 /var/www/[redacted]/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#4 /var/www/[redacted]/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#5 /var/www/[redacted]/vendor/craftcms/cms/src/web/Controller.php(178): yii\base\Controller->runAction('show-utility', Array)
#6 /var/www/[redacted]/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('show-utility', Array)
#7 /var/www/[redacted]/vendor/craftcms/cms/src/web/Application.php(291): yii\base\Module->runAction('utilities/show-...', Array)
#8 /var/www/[redacted]/vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application->runAction('utilities/show-...', Array)
#9 /var/www/[redacted]/vendor/craftcms/cms/src/web/Application.php(276): yii\web\Application->handleRequest(Object(craft\web\Request))
#10 /var/www/[redacted]/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#11 /var/www/[redacted]/web/index.php(21): yii\base\Application->run()
#12 {main}
EDIT: The solution, as provided by Brad in the comments, was to delete composer.json along with the vendor directory and then run 'composer update'.