• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to install Ghostscript on Ubuntu 16.04

{{postValue.id}}

To install Ghostscript on Ubuntu 16.04

Ghostscript is an interpreter for PostScript and Portable Document Format (PDF) files. Its main purpose is to rasterize or render page description language files, for displaying or printing of document pages, and the conversion between PostScript and PDF files. This article explains about the installation of Ghostscript on Ubuntu.

Installing Ghostscript

Before installing Ghostscript, update the apt source.

root@linuxhelpubnt:~# apt-get update 
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Get:2 http://in.archive.ubuntu.com/ubuntu xenial InRelease [247 kB]
Get:3 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [211 kB]
Hit:4 http://in.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:5 http://in.archive.ubuntu.com/ubuntu xenial-backports InRelease           
Get:6 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 Packages [1,201 kB]
Get:7 http://security.ubuntu.com/ubuntu xenial-security/main i386 Packages [204 kB]
Get:8 http://security.ubuntu.com/ubuntu xenial-security/main Translation-en [88.5 kB]
Get:9 http://security.ubuntu.com/ubuntu xenial-security/main amd64 DEP-11 Metadata [68.1 kB]
Get:10 http://security.ubuntu.com/ubuntu xenial-security/main DEP-11 64x64 Icons [43.1 kB]
Get:11 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages [6,828 B]
Get:12 http://security.ubuntu.com/ubuntu xenial-security/restricted i386 Packages [6,804 B]
Get:13 http://security.ubuntu.com/ubuntu xenial-security/restricted Translation-en [2,272 B]
Get:14 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 DEP-11 Metadata [200 B]
Get:15 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [73.8 kB]
Get:16 http://security.ubuntu.com/ubuntu xenial-security/universe i386 Packages [70.1 kB]
Get:17 http://security.ubuntu.com/ubuntu xenial-security/universe Translation-en [41.7 kB]
Get:18 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 DEP-11 Metadata [32.1 kB]
Get:19 http://security.ubuntu.com/ubuntu xenial-security/universe DEP-11 64x64 Icons [37.0 kB]
Get:20 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [2,744 B]
Get:21 http://security.ubuntu.com/ubuntu xenial-security/multiverse i386 Packages [2,908 B]
Get:22 http://security.ubuntu.com/ubuntu xenial-security/multiverse Translation-en [1,232 B]
Get:23 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 DEP-11 Metadata [212 B]
Get:24 http://security.ubuntu.com/ubuntu xenial-security/multiverse DEP-11 64x64 Icons [29 B]
Get:25 http://in.archive.ubuntu.com/ubuntu xenial/main i386 Packages [1,196 kB]
Get:26 http://in.archive.ubuntu.com/ubuntu xenial/main Translation-en [568 kB] 
Get:27 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 DEP-11 Metadata [733 kB]
Get:28 http://in.archive.ubuntu.com/ubuntu xenial/main DEP-11 64x64 Icons [409 kB]
Get:29 http://in.archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages [8,344 B]
Get:30 http://in.archive.ubuntu.com/ubuntu xenial/restricted i386 Packages [8,684 B]
Get:31 http://in.archive.ubuntu.com/ubuntu xenial/restricted Translation-en [2,908 B]
Get:32 http://in.archive.ubuntu.com/ubuntu xenial/restricted amd64 DEP-11 Metadata [186 B]
Get:33 http://in.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [7,532 kB]
Hit:34 http://in.archive.ubuntu.com/ubuntu xenial/universe i386 Packages       
Get:35 http://in.archive.ubuntu.com/ubuntu xenial/universe Translation-en [4,354 kB]
Ign:34 http://in.archive.ubuntu.com/ubuntu xenial/universe i386 Packages       
Get:36 http://in.archive.ubuntu.com/ubuntu xenial/universe amd64 DEP-11 Metadata [3,410 kB]
Get:37 http://in.archive.ubuntu.com/ubuntu xenial/universe DEP-11 64x64 Icons [7,448 kB]
Get:38 http://in.archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages [144 kB]
Get:39 http://in.archive.ubuntu.com/ubuntu xenial/multiverse i386 Packages [140 kB]
Get:40 http://in.archive.ubuntu.com/ubuntu xenial/multiverse Translation-en [106 kB]
Get:41 http://in.archive.ubuntu.com/ubuntu xenial/multiverse amd64 DEP-11 Metadata [63.8 kB]
Get:42 http://in.archive.ubuntu.com/ubuntu xenial/multiverse DEP-11 64x64 Icons [230 kB]
Get:34 http://in.archive.ubuntu.com/ubuntu xenial/universe i386 Packages [7,512 kB]
Fetched 28.8 MB in 3min 46s (127 kB/s)
AppStream cache update completed, but some metadata was ignored due to errors.
Reading package lists... Done

Now is the time to install Ghostscript. Install it with the help of the following command.

root@linuxhelpubnt:~# apt-get install ghostscript
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  ghostscript-x libgs9
Suggested packages:
  hpijs
The following packages will be upgraded:
  ghostscript ghostscript-x libgs9
3 upgraded, 0 newly installed, 0 to remove and 458 not upgraded.
Need to get 2,134 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 ghostscript amd64 9.18~dfsg~0-0ubuntu2.3 [40.9 kB]
Get:2 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 ghostscript-x amd64 9.18~dfsg~0-0ubuntu2.3 [34.3 kB]
Get:3 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgs9 amd64 9.18~dfsg~0-0ubuntu2.3 [2,059 kB]
Fetched 2,134 kB in 11s (180 kB/s)                                             
(Reading database ... 172193 files and directories currently installed.)
Preparing to unpack .../ghostscript_9.18~dfsg~0-0ubuntu2.3_amd64.deb ...
Unpacking ghostscript (9.18~dfsg~0-0ubuntu2.3) over (9.18~dfsg~0-0ubuntu2) ...
Preparing to unpack .../ghostscript-x_9.18~dfsg~0-0ubuntu2.3_amd64.deb ...
Unpacking ghostscript-x (9.18~dfsg~0-0ubuntu2.3) over (9.18~dfsg~0-0ubuntu2) ...
Preparing to unpack .../libgs9_9.18~dfsg~0-0ubuntu2.3_amd64.deb ...
Unpacking libgs9:amd64 (9.18~dfsg~0-0ubuntu2.3) over (9.18~dfsg~0-0ubuntu2) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Setting up libgs9:amd64 (9.18~dfsg~0-0ubuntu2.3) ...
Setting up ghostscript (9.18~dfsg~0-0ubuntu2.3) ...
Setting up ghostscript-x (9.18~dfsg~0-0ubuntu2.3) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...

If you want to check the version of Ghostscript, use the following command.

root@linuxhelpubnt:~# ghostscript -v
GPL Ghostscript 9.18 (2015-10-05)
Copyright (C) 2015 Artifex Software, Inc.  All rights reserved.

Tags:
aiden
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

How do I view a PDF (or Postscript) with Ghostscript on Unix?

A

More normally, Ghostscript can be invoked from a command line prompt (such as an xterm, or a terminal window):
gs -sDEVICE=display

Q

Do I embed Ghostscript in my own apps?

A

Yes. But the licensing selection, AGPL Ghostscript or Artifex Ghostscript, is very important.

Q

How do I build Ghostscript from source on Linux?

A

Once you have downloaded (and unpacked) the source, then it can be built using:
./autogen.sh (Not required for releases)
./configure
make
and optionally:
make install

Q

Does I use Ghostscript to post-process PS/PDFs?

A

Absolutely. Ghostscript is used extensively by people wishing to convert from one standard of PDF to another and to optimize the output given.

Q

How can I use Ghostscript to convert PS/PDFs to images?

A

Absolutely. For instance:

gs -sDEVICE=png16m -r300 -o page%d.png

will read inputfile, and render each page of it as a 300dpi PNG into page1.png, page2.png, page3.png etc in turn.

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Luke ?
workbench for debian

I am using workbench in CentOS whereas now I need to use Debian Operating system so could you please help to install and use in Debian?

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.