This guide will explain you how to setup your system and install the EPUBcheck command line program.
§ Installing Java
To use EPUBCheck on the command line, you’ll need Java 7 or or a later version.
You can check if Java is already installed on your computer by running the following command:
If Java is available, the command will return the version of Java called with the
java command, for instance:
openjdk version "126.96.36.199" 2020-11-04 OpenJDK Runtime Environment AdoptOpenJDK (build 188.8.131.52+1) OpenJDK 64-Bit Server VM AdoptOpenJDK (build 184.108.40.206+1, mixed mode)
If you get an error message saying the
java command could not be found, it means you need to install Java.
There are several providers of Java virtual machines (JVM), and several ways to install Java, depending on your operating system. If you’re new to Java or do not know what to install, we recommend downloading a pre-built binary from AdoptOpenJDK, with the default options.
§ Installing EPUBCheck
§ Using the official distribution
We distribute EPUBCheck as a ZIP archive (
.zip file) containing the EPUBCheck binaries and all its dependencies.
To install EPUBCheck, you need to follow these steps:
- download the latest version of EPUBCheck
- unzip the downloaded ZIP file
To run EPUBCheck and verify that your installation is functional, go to the unpacked directory and run the following command:
java -jar epubcheck.jar --version
The command should return the version of EPUBCheck you just installed. For instance:
§ Using a package manager
Alternatively to the previous method, you can possibly download and install EPUBcheck from a package manager.
This method can be easier as it will typically create an
epubcheck command that you can run anywhere in your file system (without having to call it through the
§ On macOS
You can install EPUBCheck via Homebrew with the command:
brew install epubcheck
§ On Ubuntu or Debian
You can install EPUBCheck via APT with the command:
apt-get install epubcheck
§ Updating EPUBCheck
EPUBCheck does not come with a built-in updater tool. To update EPUBcheck to a newer version (or similarly revert to an older version), you’ll need to download the new version and replace the content of your EPUBCheck directory with the content of the newly downloaded ZIP archive. You can follow the steps above to install the latest EPUBCheck version.
Alternatively, if you installed EPUBCheck with a package manager, you should be able to use the same package manager to update EPUBCheck. Please refer to the documentation of your package manager of choice to know the udpate procedure.
§ Ready to run?
If you successfully went through the steps described in this guide, you now have a functional installation of EPUBCheck… congratulations! You can now try to check a first EPUB publication.
If anything went wrong and you could not install EPUBCheck, do not worry! We do not want to let you down… You can probably get help, or maybe try using EPUBCheck with a third-party graphical user interface?