sh: line 1: gs: command not found
I got this error: "sh: line 1: gs: command not found" when running command "convert" of ImageMagick. Does anyone know how to resolve this issue?
|
you are not running convert of ImageMagick because it is a binary file.
Use 'convert -version' and it'd produce: Code:
Version: ImageMagick 6.2.0 03/17/05 Q16 http://www.imagemagick.org Try 'convert -version' in your PC. It'd prove if you are running something else. (But you may see the same sh error again...) Or you can open and read that 'convert' file to find out what it is. |
I am running convert of ImageMagick because the execution of "convert -version" returns with:
Version: @(#)ImageMagick 5.3.8 09/01/01 Q:16 http://www.imagemagick.org Copyright: Copyright (C) 2001 ImageMagick Studio |
Interesting. because the error message is usually given out by a shell script.
Since your version of ImageMagick is rather old, do you think you can upgrade first and then try again... |
Do you have gs (Ghostscript) installed?
|
I don't have gs installed on my machine. Where can I get it? Is it a dependency of Imagemagick?
|
What distro are you using? Its likely that your distro already has this packaged for you. Other wise google ghostscript, its the first link i believe.
|
I have just installed ghostscript, and it comes with the new error:
gs: error while loading shared libraries: libpng.so.2: cannot open shared object file: No such file or directory That is strange because I already have libpng installed on my machine. |
Do you have libpng.so.2? try locate libpng.so.2. It should be in /usr/lib/. Also try ldconfig as root.
|
I don't see libpng.so.2 in /usr/lib. I don't see it any where on my machine.
|
Hmmm. I would reinstall your libpng package.
|
I have tried to re-install many versions of libpng, but I still don't see libpng.so.2. Can anyone send it to me? I would appreciate it.
|
I found libpng.so.2 in /usr/local/lib, then I copied it to /usr/lib. After that, I executed command convert, and it turn a lot of errors:
Error: /invalidfont in findfont Operand stack: Times-Roman-ISO Times-Roman-ISO Times-Roman Font Times-Roman 221098 Times-Roman --nostringval-- Times-Roman NimbusRomNo9L-Regu Courier NimbusMonL-Regu Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- 3 3 %oparray_pop 4 3 %oparray_pop --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 7 4 %oparray_pop --nostringval-- --nostringval-- --nostringval-- 1 -1 1 --nostringval-- %for_neg_int_continue Dictionary stack: --dict:1126/1686(ro)(G)-- --dict:0/20(G)-- --dict:72/200(L)-- --dict:17/17(ro)(G)-- --dict:1126/1686(ro)(G)-- Current allocation mode is local Last OS error: 2 Current file position is 263 AFPL Ghostscript 8.51: Unrecoverable error, exit code 1 Error: /invalidfont in findfont Operand stack: Times-Roman-ISO Times-Roman-ISO Times-Roman Font Times-Roman 221098 Times-Roman --nostringval-- Times-Roman NimbusRomNo9L-Regu Courier NimbusMonL-Regu Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- 3 3 %oparray_pop 4 3 %oparray_pop --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 7 4 %oparray_pop --nostringval-- --nostringval-- --nostringval-- 1 -1 1 --nostringval-- %for_neg_int_continue Dictionary stack: --dict:1126/1686(ro)(G)-- --dict:0/20(G)-- --dict:72/200(L)-- --dict:17/17(ro)(G)-- --dict:1126/1686(ro)(G)-- Current allocation mode is local Last OS error: 2 Current file position is 263 AFPL Ghostscript 8.51: Unrecoverable error, exit code 1 convert: no decode delegate for this image format `/tmp/magick-XXx2mftL'. Error: /invalidfont in findfont Operand stack: Times-Roman-ISO Times-Roman-ISO Times-Roman Font Times-Roman 221098 Times-Roman --nostringval-- Times-Roman NimbusRomNo9L-Regu Courier NimbusMonL-Regu Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- 3 3 %oparray_pop 4 3 %oparray_pop --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 7 4 %oparray_pop --nostringval-- --nostringval-- --nostringval-- 1 -1 1 --nostringval-- %for_neg_int_continue Dictionary stack: --dict:1126/1686(ro)(G)-- --dict:0/20(G)-- --dict:72/200(L)-- --dict:17/17(ro)(G)-- --dict:1126/1686(ro)(G)-- Current allocation mode is local Last OS error: 2 Current file position is 263 AFPL Ghostscript 8.51: Unrecoverable error, exit code 1 Error: /invalidfont in findfont Operand stack: Times-Roman-ISO Times-Roman-ISO Times-Roman Font Times-Roman 221098 Times-Roman --nostringval-- Times-Roman NimbusRomNo9L-Regu Courier NimbusMonL-Regu Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- 3 3 %oparray_pop 4 3 %oparray_pop --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 7 4 %oparray_pop --nostringval-- --nostringval-- --nostringval-- 1 -1 1 --nostringval-- %for_neg_int_continue Dictionary stack: --dict:1126/1686(ro)(G)-- --dict:0/20(G)-- --dict:72/200(L)-- --dict:17/17(ro)(G)-- --dict:1126/1686(ro)(G)-- Current allocation mode is local Last OS error: 2 Current file position is 263 AFPL Ghostscript 8.51: Unrecoverable error, exit code 1 convert: no decode delegate for this image format `/tmp/magick-XXaeZjBL'. Can anyone help me fix the problem? |
You should not just copy the so file over to new location.
The proper way is to (while the file stays where it was) include the path /usr/local/lib in ld.so.conf and then run ldconfig It is akin to register a so file |
You need to install the ghostscript-fonts package. As you seem to be lacking fonts.
|
All times are GMT -5. The time now is 02:11 AM. |