LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-25-2005, 01:45 PM   #1
notooth
Member
 
Registered: Apr 2005
Posts: 192

Rep: Reputation: 15
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?
 
Old 04-25-2005, 01:50 PM   #2
ahwkong
Member
 
Registered: Aug 2004
Location: Australia
Distribution: Fedora
Posts: 282

Rep: Reputation: 30
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
Copyright: Copyright (C) 1999-2005 ImageMagick Studio LLC

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.
 
Old 04-26-2005, 12:28 AM   #3
notooth
Member
 
Registered: Apr 2005
Posts: 192

Original Poster
Rep: Reputation: 15
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
 
Old 04-26-2005, 12:32 AM   #4
ahwkong
Member
 
Registered: Aug 2004
Location: Australia
Distribution: Fedora
Posts: 282

Rep: Reputation: 30
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...
 
Old 04-26-2005, 12:40 AM   #5
almostlucky
Member
 
Registered: Apr 2002
Posts: 32

Rep: Reputation: 15
Do you have gs (Ghostscript) installed?
 
Old 04-26-2005, 03:35 AM   #6
notooth
Member
 
Registered: Apr 2005
Posts: 192

Original Poster
Rep: Reputation: 15
I don't have gs installed on my machine. Where can I get it? Is it a dependency of Imagemagick?
 
Old 04-26-2005, 10:58 AM   #7
almostlucky
Member
 
Registered: Apr 2002
Posts: 32

Rep: Reputation: 15
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.
 
Old 04-26-2005, 12:28 PM   #8
notooth
Member
 
Registered: Apr 2005
Posts: 192

Original Poster
Rep: Reputation: 15
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.
 
Old 04-26-2005, 02:02 PM   #9
almostlucky
Member
 
Registered: Apr 2002
Posts: 32

Rep: Reputation: 15
Do you have libpng.so.2? try locate libpng.so.2. It should be in /usr/lib/. Also try ldconfig as root.
 
Old 04-26-2005, 02:34 PM   #10
notooth
Member
 
Registered: Apr 2005
Posts: 192

Original Poster
Rep: Reputation: 15
I don't see libpng.so.2 in /usr/lib. I don't see it any where on my machine.
 
Old 04-26-2005, 03:22 PM   #11
almostlucky
Member
 
Registered: Apr 2002
Posts: 32

Rep: Reputation: 15
Hmmm. I would reinstall your libpng package.
 
Old 04-26-2005, 05:09 PM   #12
notooth
Member
 
Registered: Apr 2005
Posts: 192

Original Poster
Rep: Reputation: 15
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.
 
Old 04-27-2005, 11:10 AM   #13
notooth
Member
 
Registered: Apr 2005
Posts: 192

Original Poster
Rep: Reputation: 15
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?
 
Old 04-27-2005, 05:37 PM   #14
ahwkong
Member
 
Registered: Aug 2004
Location: Australia
Distribution: Fedora
Posts: 282

Rep: Reputation: 30
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
 
Old 04-27-2005, 06:22 PM   #15
Krugger
Member
 
Registered: Oct 2004
Posts: 229

Rep: Reputation: 30
You need to install the ghostscript-fonts package. As you seem to be lacking fonts.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a single command to list all hardware installed (command line)? davee Linux - Hardware 6 02-28-2009 07:19 PM
help required to solve error = line 3: H: command not found Imtiaz Deen Red Hat 1 07-29-2005 01:01 PM
default.hotplug: line 1: env: command not found voyciz Slackware 2 03-04-2005 09:44 AM
Command to output file content line by line aznluvsmc Programming 2 09-12-2004 07:45 PM
51 characters only in the 1st Line of command line eggCover Linux - General 2 07-29-2004 01:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration