2

On my Linux Mint 22 Cinnamon (Wilma) based on Ubuntu 24.04 LTS (Noble).

I ended up installing Calibre in spite my initial dislike, via Flatpak:

$ flatpak install flathub com.calibre_ebook.calibre

The installation was successful, but the the shell can't find the ebook-convert command (official manual page link).


Reasoning about choosing Flatpak version:

At this point of time, reading upon the changelog here: https://calibre-ebook.com/whats-new

It is obvious the developer(s) are very active. The packaged version is Release: 7.6 [01 Mar, 2024], whereas the Flatpak version is the latest available (Release: 7.20 [18 Oct, 2024]).

In spite, I originally have thought I would only use the ebook conversion command, this software might surprise me,..

3
  • Out of curiosity, why Flatpak rather than the pakaged version? Commented Oct 21, 2024 at 21:49
  • 1
    @StephenKitt Morning Stephen. Just because the packaged version is newer (about half a year, but I cannot remmember really). I read most of the changelog, and .. these developers are very active, fixing bugs, etc.: calibre-ebook.com/whats-new I should likely point that out directly in my question, right(?) Now I need a lot of coffee to wake up. Have a good day! Commented Oct 22, 2024 at 6:39
  • Ah yes, there are indeed lots of changes since the version in 24.04! I was going to say there’s no need to mention it in the question IMO, I was just curious following your earlier question on the topic — but in fact it’s the use of Flatpak that leads to the question, installing the Calibre packages would make ebook-convert available to you as usual; so mentioning this in the question would make sense. Good day to you too! Commented Oct 22, 2024 at 6:53

1 Answer 1

4

One way to go about this:

$ sudo updatedb
[sudo] password for vlastimil:

# - No output means it is still running.
# - Once it is finished, your prompt re-appears.
# - It can take much time if not running fast SSDs.

$ locate ebook-convert

/var/lib/flatpak/app/com.calibre_ebook.calibre/x86_64/stable/3ffcc2f6b264f6549554e88892c32eb48cd83386b8629e839bb693d2010aeaa6/files/bin/ebook-convert
/var/lib/flatpak/app/com.calibre_ebook.calibre/x86_64/stable/3ffcc2f6b264f6549554e88892c32eb48cd83386b8629e839bb693d2010aeaa6/files/lib/calibre/ebook-convert
/var/lib/flatpak/app/com.calibre_ebook.calibre/x86_64/stable/3ffcc2f6b264f6549554e88892c32eb48cd83386b8629e839bb693d2010aeaa6/files/lib/calibre/bin/ebook-convert
/var/lib/flatpak/app/com.calibre_ebook.calibre/x86_64/stable/3ffcc2f6b264f6549554e88892c32eb48cd83386b8629e839bb693d2010aeaa6/files/lib/calibre/resources/ebook-convert-complete.calibre_msgpack
/var/lib/flatpak/app/com.calibre_ebook.calibre/x86_64/stable/3ffcc2f6b264f6549554e88892c32eb48cd83386b8629e839bb693d2010aeaa6/files/share/bash-completion/completions/ebook-convert

There you can see two options. If you try this one, you get an error, but the second one works:

/var/lib/flatpak/app/com.calibre_ebook.calibre/x86_64/stable/3ffcc2f6b264f6549554e88892c32eb48cd83386b8629e839bb693d2010aeaa6/files/lib/calibre/bin/ebook-convert: error while loading shared libraries: libcalibre-launcher.so: cannot open shared object file: No such file or directory

As I am using Bash, I can simply create an alias to the correct file (i.e. without /bin/ before ebook-convert like this:

alias ebook-convert='/var/lib/flatpak/app/com.calibre_ebook.calibre/x86_64/stable/3ffcc2f6b264f6549554e88892c32eb48cd83386b8629e839bb693d2010aeaa6/files/lib/calibre/ebook-convert'

Working command:

$ ebook-convert

Usage: ebook-convert input_file output_file [options]

Convert an e-book from one format to another.

input_file is the input and output_file is the output. Both must be specified as the first two arguments to the command.

The output e-book format is guessed from the file extension of output_file. output_file can also be of the special format .EXT where EXT is the output file extension. In this case, the name of the output file is derived from the name of the input file. Note that the filenames must not start with a hyphen. Finally, if output_file has no extension, then it is treated as a folder and an "open e-book" (OEB) consisting of HTML files is written to that folder. These files are the files that would normally have been passed to the output plugin.

After specifying the input and output file you can customize the conversion by specifying various options. The available options depend on the input and output file types. To get help on them specify the input and output file and then use the -h option.

For full documentation of the conversion system see
https://manual.calibre-ebook.com/conversion.html

Whenever you pass arguments to ebook-convert that have spaces in them, enclose the arguments in quotation marks. For example: "/some path/with spaces"

Options:
  --version       show program's version number and exit

  -h, --help      show this help message and exit

  --list-recipes  List builtin recipe names. You can create an e-book from a
                  builtin recipe like this: ebook-convert "Recipe Name.recipe"
                  output.epub


Created by Kovid Goyal <[email protected]>

If you have some better solution, please post it, cheers.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.