Mobi compile fail


My first attempt at an epub compile worked perfectly. Not so when I tried to compile a mobi from the same files. Here’s the message:

KindleGen failed to generate a .mobi file at the expected location.

I downloaded Kindle gen. Running OSX10.8.3 on an iMac.

Thanks for help & advice.

KindleGen might be in quarantine… … -scrivener

Brian, thank you for taking the time to reply. I purchased Scriv from L&L so the fix referred to doesn’t help.

Anyone know why I’m getting the fail message when I try to compile for mobi? Here’s the message:

KindleGen failed to generate a .mobi file at the expected location.

“Terminal” shows on my dashboard. Don’t know if that’s relevant or not but thought I’d add the info.

Thanks again for advice/input.

With the security settings in Mountain lion, it might be that KindleGen hasn’t yet got permission to run in its own right.

If you click on KG as in the notes below, does it run okay?

Hi Brian, Thanks again. Still won’t compile to mogi. Get the same fail message as in the OP.

After I control-click, I do not see: A message will appear, either warning you that kindlegen was downloaded from the internet or that it is from an unidentified developer. Click on “Open”.

Instead, it allows me to open and then this message appears:

Last login: Thu Apr 11 09:36:20 on ttys000
ruths-imac:~ ruth$ /Users/ruth/Desktop/KindleGen_Mac_i386_v2_8/kindlegen ; exit;

Amazon kindlegen(MAC OSX) V2.8 build 0208-797bf75
A command line e-book compiler
Copyright and its Affiliates 2013

Usage : kindlegen [filename.opf/.htm/.html/.epub/.zip or directory] [-c0 or -c1 or c2] [-verbose] [-western] [-o ]
zip/directory formats are supported for XMDF sources
-c0: no compression
-c1: standard DOC compression
-c2: Kindle huffdic compression
-o : Specifies the output file name. Output file will be created in the same directory as that of input file. should not contain directory path.
-verbose: provides more information during ebook conversion
-western: force build of Windows-1252 book
-releasenotes: display release notes
-gif: images are converted to GIF format (no JPEG in the book)
-locale : To display messages in selected language
en: English
de: German
fr: French
it: Italian
es: Spanish
zh: Chinese
ja: Japanese
pt: Portuguese

[Process completed]

What should I try next? Brian, thanks again. I appreciate your help!


You have got KindleGen installed on your desktop by the look of things and it seems to be running and authorised without error according to the log.

Some ideas:

(1) Because the desktop of any OS is special, the problem might be because KindleGen is installed on it. Personally, I would move it (or reinstall it) to another folder, such as the main Applications folder. If you do move/reinstall it, you would need to tell Compile where to find KG in its new location.


(2) If number (1) doesn’t make a difference, I would create a new dummy Scrivener file with a few random lines of text and see if that compiles to KindleGen. If that works but the your main file doesn’t, then it would suggest that there is some form of corruption or incorrect setting impacting on the main file.

(3) If you have another computer running Scrivener or a friend with Scrivener, you could try compiling the file on another machine. This should show if the file itself is problematical or if the issue is with something on your computer.

(4) After that, I’d contact L&L’s Mac support team:

Good luck

Briar—as in Briar Rose or Briar Pipe, rather than The Life of Brian :smiley:

Another test: get Kindle Previewer from Amazon and see if that works. I don’t know if KP uses Kindlegen or includes it, though. But if KP does access Kindlegen, then this is another program that tries to use it. Run KP and try to change say a HTML file into Kindle format, just to see if it runs.

If KP also fails, then I imagine the problem is not with Scrivener but with how Kindlegen and Mountain Lion are interacting.

Without running or getting KP, you might also just run Kindlegen via the terminal to see what happens.


You could also just open the .epub you created in Kinde Previewer, which SHOULD auto-convert it to .mobi… If KG is having issues it might not, though. I think it uses its own version of KG though, so it working may not rule out a KG issue - but atleast if it works, you’ll have your .mobi file.

This is turning into a saga! Thank you, everyone, for your time and help.

Brian, I moved Kindlegen to Applications. I see it there, but the Scriv screen that appears after “choose” offers only two options: “cancel” and “open.” However, “open” is dimmed so all I can do is “cancel.” I have other projects coming up so I really, really want to be able to create a mobi via scriv.

Terminal is on my dashboard. Should it be?

Asotir, thank you but I’m not a techie and don’t have an HTML file. Or, if I do, I’d be afraid to mess with it. I know, hopeless, but there it is. :frowning:

temporalranger, Thank you. If I simply cannot get a mobi file via Compile, then I will try to upload the epub. I care about giving my readers a quality experience and am afraid (perhaps unnecessarily) that letting Previewer create the mobi might end up chop suey. There are so many reader complaints about poorly formatted ebooks that I’m being cautious.

Thanks again, everyone. I’ve used and loved Scriv for years and want it to work for me as it should.

After clicking “choose”, you need to navigate to the place where KindleGen is installed in the Applications folder, select the actual KG app and then choose open…open will be clickable as soon as the program has been properly selected. This will establish a link between Scrivener and KindleGen, at which point everything should work. I’d attach screenshots to show you what to do, but I’m not near a Mac at the moment…

There is a video here that might help…

You can quit Terminal. Not needed.


Briar, I started all over again, trashed the old Kindlegen. Redownloaded Kindlegen. Dragged it to my applications folder. Selected it & this time, I was able to click open. The Scriv Compile window tells me KindleGen is installed. Underneath the “Change…” field I see /Applications/kindlegen.

I still get a fail message when I try to compile a mobi file!

BTW, I get an Export window after I click “compile” even tho I’m in the project I want to compile. In the Export window, the project I want to compile is dimmed out. Is this a clue?

Thank you so so much for your help and patience. I can’t believe this is causing such grief when everything in Scriv always works so well.

One question: can you compile to any format whatsoever?

If you can, then I second AmberV’s general practice: compile as ebook in epub format. Then open the MyBook.epub in Kindle Previewer (download for free from Amazon). Kindle Previewer should convert the epub to .mobi format as well as showing you a pretty-fair representation of what your book will look like in Kindle Fire, Kindle eInk devices, and iOS devices iPhone and iPad.

Since the techie details are hard, just accept the converted .mobi as it is, unless you find something catastrophically wrong with it as you page through it.

You will have to rename the converted file from “” or some such, to “” (assumint your book is titled “MyBook”).

good luck!


asotir, Thank you! Yes, I was able to create an epub in Scriv so will do as you suggest. I appreciate your input.

Wish I could figure out what the problem is, tho. Frustrating.

What are you using to unzip the KindleGen utility? Try right-clicking on the download and choosing “Archive Utility” specifically, from the “Open With” sub-menu. Some third-party unzip tools are not UNIX aware, and fail to set the necessary permissions to the KindleGen file.

Thank you, Amber. Right-clicking on the download doesn’t offer “Archive Utility” in the “open with” sub-menu.
Is there another alternative or some other way to access the “Archive Utility” option?

That’s odd, Archive Utility is a basic Mac utility—even more fundamental than Preview or TextEdit, it should be on every Mac. You are right-clicking the downloaded .zip file in Finder? Well, the program itself is located in /System/Library/CoreServices. You could navigate there from your boot disk in Finder. Once you have it open, use File/Expand Archive... and select the downloaded .zip as the target.

Hi Amber,

I have both Preview & TextEdit but not Archive Utility. I have the newest iMac but no boot disc.

Here is the list of utilities: Is it possible the name “Archive Utility” has been changed to something else?

Activity Monitor
Adobe Flash Player Install Manager
AirPort Utility
AppleScript Editor
Audio MIDI Setup
Bluetooth File Exchange
Boot Camp Assistant
ColorSync Utility
DigitalColor Meter
Disk Utility
iPhoto Library Upgrader
Keychain Access
Migration Assistant
Network Utility
RAID Utility
System Information
VoiceOver Utility

Amber, I’m just lost here. I’m so accustomed to Scriv working so well…

That looks like a listing of the Utilities folder, it won’t be there. Like I say it is located in the /System/Library/CoreServices folder, which can be navigated to from the volume or disk level (same as Applications). There should be over a hundred items in the folder; things like the Dock that hold your icons, Finder itself and other core parts of the OS are located here. You should see Archive Utility in there. If you double-click on it, it will open and give you an icon in the Dock where you can drop the downloaded KindleGen zip.

Hi Amber,

I opened Archive Utility, have it on my dock, dropped the KindleGen zip on it but, when I tried to compile a mobi file, I still get a “compile fail” message. What should I try next?

BTW, forgot to mention that this is a text file. No images, tables, charts etc.

Thanks so much for your continued help.

PS: Just did another epub compile on the same file as a test. Worked with no problem so it’s only the mobi that won’t compile. Hope this is a clue.

Yeah, I wouldn’t expect ePub to stop working, as this seems to be strictly an issue with KindleGen being too confused to make a Mobi file or some such. Have you tried switching on the log option in the KindleGen compile pane and examining the .log file? That might have something informative in it.