Exports are not an option?

When on the export screen, I do not get an option to export beyond XML. I do get the message that some dependencies are not found. I have read documentation on epubcheck - but I’m thinking this is a bigger issue?

Possible Relevant Information

  1. Have installed PB on multiple hosts (local, AWS, DO) using LAMP stack. Same issue.
  2. Wordpress 4.7.3 / PHP 7.0 / PB 3.9.8.2

Any help is appreciated! How can I install epub / mobi dependencies?

Hi @zvanderveen—you need to install all the dependencies listed here on your server:

Specifically, under Part 3, Pressbooks dependencies. All of the linked libraries have their own installation instructions. Depending on your hosting environment, you may not be able to install certain components (e.g. shared hosting will not allow the necessary dependencies to be installed).

Hope this clarifies!

Thanks Ned!

I’m likely still missing something obvious here. I’ve installed epubcheck, java, etc. (as well as kindlegen) and still don’t have them as option for export. (Also made appropriate changes to the config file).

I’m using Digital Ocean for my install (clean).

Any other areas you’d point me towards?

Also, as epubcheck is a validation tool (not export tool), is it required in order for PB to generate an epub?

Again, many kind regards.

@zvanderveen Sounds like you may need to define the paths where the dependencies are installed in wp-config.php. From the docs:

define( 'PB_PRINCE_COMMAND', '/usr/bin/prince' );
define( 'PB_KINDLEGEN_COMMAND', '/opt/kindlegen/kindlegen' );
define( 'PB_EPUBCHECK_COMMAND', '/usr/bin/java -jar /opt/epubcheck/epubcheck.jar' );
define( 'PB_XMLLINT_COMMAND', '/usr/bin/xmllint' );
define( 'PB_SAXON_COMMAND', '/usr/bin/java -jar /opt/saxon-he/saxon-he.jar' );

You are correct that EpubCheck is a validation tool. The reason we (strongly) encourage using it is that any Epub validation errors will prevent KindleGen from successfully converting an Epub into a MOBI file.

Oh, never mind, I see you updated your config file. Hmm.

To check if you have the tools installed Pressbooks tries to execute them using the exec function.

Is it possible that PHP doesn’t have permission to run the installed software? For example if I do:

ls -al /opt/kindlegen/ | grep kindlegen

I get:

-rwxrwxrwx 1 311227 users 28673912 Oct 29 2014 kindlegen

This is OK. If instead it was:
-rwxrwxr-- 1 311227 users 28673912 Oct 29 2014 kindlegen

Then I would get a MOBI dependency error.