I've just got a server setup for which will need to convert RTF files to PDF using TED and the following script - which I will later exec() in php:

Right now I've installed Ted, placed the above script in the correct location (same location as Ted) and I believe i've installed Ghostscript but when I run the command:
rtf2pdf.sh something.rtf something.pdf

I recieve the following errors:

Since I know very little about Debian or any other linux distro for that matter I'm hoping someone could help me out in any way possible - it would be greatly appreciated.