Are you trying to install the PHP imagick extension but keep getting this error?
Besides the imagick extension there are 2 packages you need: imagemagick and libmagick9-dev.

apt-get install imagemagick libmagick9-dev
pecl install imagick

Don’t forget to add “extension=imagick.so” to your php.ini file and you should be ready to go.