gs_init.ps not found

Anonymous anonymous at easysw.com
Tue Mar 22 09:42:19 PST 2005


> I'm receiving the following in my cups error log:
> ESP Ghostscript 7.07.1: Can't find initialization file gs_init.ps.
>
> The file does exist on my system in /usr/share/ghostscript/7.07/lib.
>
> I'm running Gentoo and using emerge to install Ghostscript.
>
> To troubleshoot, I ran gs from the command prompt and got the same message.  So I created the environment variable GS_LIB.  I no longer get the error message at the command prompt.  But I still get the error message in the CUPS error log.  Why would CUPS not work if gs is working from the command line?

Forum,

This post is intended to detail the steps that ultimately resolved the problem.  The problem was that the Gentoo ebuild for ghostscript-7.07.1-r1 does not work correctly, at least not on my setup.  It does not set the GS_LIB_DEFAULT macro correctly during the compile.  You must edit the ebuild file so that the correct parameters are sent to the compiler.

Note: I suppose on other linux distro's that don't use portage, you would change the GS_LIB_DEFAULT= line in you makefile with the correct path(s).

Steps to fix the problem:
#Uninstall ghostscript
emerge --unmerge ghostscript

#clean up any remaining files the may be left
ebuild /usr/portage/app-text/ghostscript/ghostscript-7.07.1-r7.ebuild clean

#download the ghostscript source via gentoo portage
ebuild /usr/portage/app-text/ghostscript/ghostscript-7.07.1-r7.ebuild fetch

#digest
ebuild /usr/portage/app-text/ghostscript/ghostscript-7.07.1-r7.ebuild digest

#unpack
ebuild /usr/portage/app-text/ghostscript/ghostscript-7.07.1-r7.ebuild unpack

#edit the ebuild file
nano -w /usr/portage/app-text/ghostscript/ghostscript-7.07.1-r7.ebuild

#in this file there is a subroutine called src_compile().  In that subroutine there is a line that begins:
myconf="${myconf} --with-fontconfig --with-fontpath=
Edit this line to add /usr/share/ghostscript/7.07/lib to the fontpath= portion.  Mine ended up looking like this:
myconf="${myconf} --with-fontconfig --with-fontpath=/usr/share/ghostscript/7.07/lib:/usr/share/fonts:/usr/share/fonts/ttf/zh_TW:/usr/share/fonts/ttf/zh_CN:/usr/share/fonts/arphicfonts:/usr/share/fonts/ttf/korean/baekmuk:/usr/share/fonts/baekmuk-fonts:/usr/X11R6/lib/X11/fonts/truetype:/usr/share/fonts/kochi-substitute"

#when that's done, compile
ebuild /usr/portage/app-text/ghostscript/ghostscript-7.07.1-r7.ebuild compile

#install
ebuild /usr/portage/app-text/ghostscript/ghostscript-7.07.1-r7.ebuild install

#qmerge
ebuild /usr/portage/app-text/ghostscript/ghostscript-7.07.1-r7.ebuild qmerge

#update the environment
env-update
source /etc/profile

When this is done, cups printing and ghostscript should work fine.  At least it did for me.

Reference:
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3&chap=6






More information about the cups mailing list