Cannot run composer update after going from 8.3 to 8.5
As of 8.5 core now explicitly requires several PHP extensions in composer.json, including gd:

...
"require": {
  "ext-date": "*",
  "ext-dom": "*",
  "ext-filter": "*",
  "ext-gd": "*",
  ...


The requirements match the required extension list in system_requirements, which would theoretically have to have been met for the original installation, and they were the same all the way back to 8.0.x, so it seems likely you did have gd installed when Drupal was installed. 

Without gd installed you should also see an error message in the status report telling you it's missing; if you don't see that error, perhaps you have a different php.ini for FPM and CLI, and gd is only enabled for FPM, so it works in web but not the command line.

The relevant issue on drupal.org is here for reference.