How to install latest Sigil 0.7.4 in Ubuntu from Source Code

Last updated: December 12, 2013

Install Sigil from Source in UbuntuSigil is a multi-platform EPUB ebook. It supports both WYSIWYG and code-based editing of EPUB files, as well as the import of HTML and plain text files.

Since version 0.7.4, Sigil requires higher version of Qt5 libraries which is not available in Ubuntu’s universe repository. This tutorial will show you how to install the latest Qt5 and build sigil from source code. Works on Ubuntu 13.10, Ubuntu 14.04, Ubuntu 13.04, Ubuntu 12.04.

1. Download & Install Qt5

The qt-project website provides the latest installer for Linux. So it’s easy to install it by following the steps below:

1. Go to qt-project.org/downloads, download Qt (so far it’s 5.2.0) for Linux.

To check out OS type 32 bit or 64 bit, go to System Settings -> Details -> Overview

2. Right-click on the downloaded installer (.run file), select Properties and navigate to Permissions tab. Check the box between “Execute” and “Allow executing file as problem”.

make qt installer executable

3. Press Ctrl+Alt+T on keyboard to open terminal. When it opens, run command to start the installer (assume that you save the downloaded file in the default USER Downloads folder):

cd ~/Downloads/ && sudo ./qt-linux-opensource-*-offline.run

It brings up the install wizard. Just follow it to install Qt5 into the default /opt/ directory.

Qt 5 install wizard

2. Build Sigil against Qt5

To get started, press Ctrl+Alt+T on keyboard to open terminal and follow the below steps:

1. Run command below and type in your user password when prompt to get the super user privilege:

sudo -i

Now your terminal should starts like this:

root@YOUR_HOST_NAME:~#

2. Navigate to /opt/ directory:

cd /opt/

3. Create folders for Sigil source and build:

mkdir -p /opt/sigil/src /opt/sigil/build

4. Navigate to Sigil source folder and download 0.7.4 source code via wget:

cd /opt/sigil/src && wget https://sigil.googlecode.com/files/Sigil-0.7.4-Code.zip

5. Unzip the package:

unzip Sigil-0.7.4-Code.zip

6. Build the editor:

For 32 bit system:

cd /opt/sigil/build && cmake -G "Unix Makefiles" -DCMAKE_PREFIX_PATH=/opt/Qt5.2.0/5.2.0/gcc/lib/cmake -DCMAKE_BUILD_TYPE=Release -DFORCE_BUNDLED_COPIES=1 /opt/sigil/src && sudo make install

For 64 bit system:

cd /opt/sigil/build && cmake -G "Unix Makefiles" -DCMAKE_PREFIX_PATH=/opt/Qt5.2.0/5.2.0/gcc_64/lib/cmake -DCMAKE_BUILD_TYPE=Release -DFORCE_BUNDLED_COPIES=1 /opt/sigil/src && sudo make install

NOTE: you need to change 5.2.0 to the Qt version you installed. This command will take a few minutes building packages.

7. Now create a script to run Sigil:

echo "LD_LIBRARY_PATH=/opt/Qt5.2.0/5.2.0/gcc_64/lib /usr/local/bin/sigil" > /opt/sigil/sigil.sh

NOTE: you need to change 5.2.0 to the Qt version you installed. And remove _64 for 32 bit system.

8. Finally, you can start Sigil via this command:

/opt/sigil/sigil.sh

3. Create a Launcher for Sigil

Run exit in previous terminal or open another one, then install required package:

sudo apt-get install gnome-panel --no-install-recommends

Start the “Create Launcher” window:

sudo gnome-desktop-item-edit /usr/share/applications/ --create-new

Type in name Sigil and command /opt/sigil/sigil.sh and click OK.

Create Launcher for Sigil

Now you’re able to start Sigil from Menu or Unity Dash.

Sigil 0.7.4 in Ubuntu 13.10

Twitter

I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to let me know if the tutorial is outdated! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via [email protected] Buy me a coffee: https://ko-fi.com/ubuntuhandbook1

6 responses to How to install latest Sigil 0.7.4 in Ubuntu from Source Code

  1. Marco Lazzarotti January 12, 2014 at 4:29 pm

    Sorry but I always got this error

    CMake Error at src/Sigil/CMakeLists.txt:454 (qt5_wrap_ui):
    Unknown CMake command “qt5_wrap_ui”.

  2. Can’t get beyond step 6. This is what I get:

    CMake Warning at src/Sigil/CMakeLists.txt:38 (find_package):
    By not providing “FindQt5.cmake” in CMAKE_MODULE_PATH this project has
    asked CMake to find a package configuration file provided by “Qt5”, but
    CMake did not find one.

    Could not find a package configuration file provided by “Qt5” with any of
    the following names:

    Qt5Config.cmake
    qt5-config.cmake

    Add the installation prefix of “Qt5” to CMAKE_PREFIX_PATH or set “Qt5_DIR”
    to a directory containing one of the above files. If “Qt5” provides a
    separate development package or SDK, be sure it has been installed.

    CMake Error at src/Sigil/CMakeLists.txt:454 (qt5_wrap_ui):
    Unknown CMake command “qt5_wrap_ui”.

    • @S.Anna, where you installed the Qt5 in step “1. Download & Install Qt5”. The default option will install it into /opt/, you may check out in your file browser the extract PATH, for example “Computer -> /opt/Qt5.x.x/5.x.x/gcc(_64)/lib/cmake” and replace the PATH in step 6

  3. Hi, if you are using Ubuntu 12.04, I have built sigil 0.7.4 in Launchpad.
    ppa:bedouin/ppa

  4. Hi!

    I’m a total newbie to linux.

    I installed Lubuntu 13.10 not even 1 month ago and installed Sigil successfully (I’m surprised I was able to do this) to learn it. By the time I had time to start learning it, Lubuntu 14.04 came out and I upgaded. Unfortunately, it removed Sigil.

    Question:
    Is the latest version of Lubuntu 14.04 compatible with the latest version of Sigil 0.7.2?

    Thank you.

  5. Good howto, thank you.
    你好

    Please help.
    I could not run the script sigil.sh
    —————-

    I succeded the prévious steps untill this step :

    your howto
    7. Now create a script to run Sigil:

    echo “LD_LIBRARY_PATH=/opt/Qt5.3.2/5.3/gcc_64/lib /usr/local/bin/sigil” > /opt/sigil/sigil.sh

    —————

    ** the directory /usr/local/bin is empty;
    =========

    ** the file /opt/sigil/sigil.sh contains this line:

    LD_LIBRARY_PATH=/opt/Qt5.3.2/5.3/gcc_64/lib /usr/local/bin/sigil
    —————

    your howto
    8. Finally, you can start Sigil via this command:

    /opt/sigil/sigil.sh

    I have entered:
    chau@pck:~$ /opt/sigil/sigil.sh

    the terminal gives this:

    /opt/sigil/sigil.sh: line 1: /usr/local/bin/sigil: No such directory or file
    chau@pck:~$
    —————