While working on a system that uses tesseract-ocr to convert massive heaps of non-ocr'd PDF's into searchable text I ran into a problem with one of my linux containers I was using to convert PDF's into TIFF files that I could then feed into tesseract. The error message was vague; but eventually I was able to combine a bunch of hints from different posts around the web into a solution that works for me.

My operating environment is a standard turnkey-lamp linux container running on Proxmox 5.1. I have already installed Imagemagik and the GhostScript library (which is required). The main problem is that Imagemagik is setup to use the "gs" command as the executable for GhostScript; well, GIT is already using that command and the new actual command name for GhostScript is ghostscript (which is located in /usr/bin/ghostscript). To fix Imagemagik you have to edit the delegates.xml file. On my system that is located in /etc/ImageMagik-6. I just used the nano editor (use whatever you can work quickly with) and searched for all instances of "gs". There are about five or six lines of them; replace the "gs" with ghostscript and save the file. Hope this fixes your problem.