How can I escape from this error?
root@excel2012:~# sudo apt-get remove php5-imagick
Reading package lists... Done
Building dependency tree... Done
The following packages will be REMOVED:
php5-imagick
0 upgraded, 0 newly installed, 1 to remove and 43 not upgraded.
7 not fully installed or removed.
After this operation, 426 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 25121 files and directories currently installed.)
Removing php5-imagick ...
sed: can't read /etc/php5/conf.d/imagick.ini: No such file or directory
dpkg: error processing php5-imagick (--remove):
subprocess installed post-removal script returned error exit status 2
configured to not write apport reports
Errors were encountered while processing:
php5-imagick
E: Sub-process /usr/bin/dpkg returned an error code (1)
Edit /var/lib/dpkg/info/php5-imagick.postrm and remove the line regarding /etc/php5/conf.d/imagick.ini. Then this package should be able to be removed. Remember to modify/remove /etc/php5/conf.d/imagick.ini as you wish.
The file /etc/php5/conf.d/imagick.ini is missing. To fix do:
sudo touch /etc/php5/conf.d/imagick.ini
sudo dpkg --purge --force-all php5-imagick