2016-10-25 87 views

回答

2

這個答案是一個更新現在陳舊的答案here,有一些額外的細節和對當前回購倉位的參考。

對於更有經驗的人來說,這可能是顯而易見的,但這是爲了幫助那些對CLI/make/gcc缺乏經驗的人,他們只需要gs。

首先設置gcc-C++,如果你還沒有[是否需要所有軟件包?最後兩個似乎不需要]:

sudo yum install -y gcc gcc-c++ compat-gcc-32 compat-gcc-32-c++ 

然後下載,製作和安裝的Ghostscript:

wget https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs920/ghostscript-9.20.tar.gz 
tar -zxvf ghostscript-9.20.tar.gz 
cd ghostscript-9.20 
./configure --prefix=/usr --enable-dynamic --disable-compile-inits --with-system-libtiff 
make 
make so 
sudo make install 
sudo chmod go+w /usr/include/ghostscript/ 
sudo make soinstall && install -v -m644 base/*.h /usr/include/ghostscript && sudo ln -v -s ghostscript /usr/include/ps 
sudo ln -sfv ../ghostscript/9.20/doc /usr/share/doc/ghostscript-9.20 
cd .. 
wget http://sourceforge.net/projects/gs-fonts/files/latest/download?source=files --output-document=ghostscript-fonts-std-8.11.tar.gz 
sudo tar -xvf ghostscript-fonts-std-8.11.tar.gz -C /usr/share/ghostscript 
fc-cache -v /usr/share/ghostscript/fonts/ 
sudo mkdir /usr/include/ghostscript/ 
sudo chmod go-w /usr/include/ghostscript/ 
ghostscript -v 
gs -v 
+2

要安裝Ghostscript 9.21,只需用9.21和920替換9.20,然後在這些命令中使用921。 – GreenRaccoon23

-1

你可以把源代碼的實例,並編譯.....

+0

同意了!我想睡覺前我會得到答案,但並沒有發生這種情況。現在提供一步一步的答案。 –