Cannot execute ghostscript gs gmt error number 79

If you are encountering the error “Cannot execute ghostscript gs gmt error number 79” in Julia, there are several ways to solve it. In this article, we will explore three different solutions to this problem.

Solution 1: Install Ghostscript

The error message suggests that Ghostscript (gs) is not installed on your system. To resolve this, you can install Ghostscript by following these steps:


using Pkg
Pkg.add("Ghostscript")

This code snippet uses the Julia package manager (Pkg) to install the Ghostscript package. Once installed, you should be able to execute Ghostscript commands without encountering the error.

Solution 2: Specify Ghostscript Path

If you already have Ghostscript installed on your system, but Julia is unable to locate it, you can specify the path to the Ghostscript executable. Here’s how:


ENV["GSC"] = "/path/to/ghostscript/executable"

Replace “/path/to/ghostscript/executable” with the actual path to the Ghostscript executable on your system. This code sets the environment variable “GSC” to the specified path, allowing Julia to find and execute Ghostscript commands.

Solution 3: Update Ghostscript

If you have Ghostscript installed but it is outdated, updating it to the latest version may resolve the error. Follow these steps to update Ghostscript:


using Pkg
Pkg.update("Ghostscript")

This code snippet uses the Julia package manager to update the Ghostscript package to the latest version. After updating, try executing Ghostscript commands again to see if the error persists.

Out of the three options, the best solution depends on your specific situation. If you don’t have Ghostscript installed, Solution 1 is the way to go. If you already have Ghostscript installed but Julia can’t find it, Solution 2 is the appropriate choice. Finally, if you have an outdated version of Ghostscript, Solution 3 is recommended. Choose the solution that best fits your scenario to resolve the “Cannot execute ghostscript gs gmt error number 79” error in Julia.

Rate this post

Leave a Reply

Your email address will not be published. Required fields are marked *

Table of Contents