How to fix «The specified image adapter cannot be used because of: Required PHP extension 'Imagick' was not loaded.»?

How to set «GD2» as the default image adapter from the command line?