How to build from sources on Ubuntu 16.04.1 LTS

1,784 views
Skip to first unread message

Cristian Ghezzi

unread,
Nov 17, 2016, 10:53:45 AM11/17/16
to wkhtmltopdf General
I need to build the 0.13 alpha version on Ubuntu 16.04.1 LTS.
My attempt failed with the following error:

/home/myuser/wkhtmltopdf-0.13/static-build/../qt/qtbase/configure: No such file or directory


I didn't find the complete build instructions anywhere. This is what I did:
    wget https://github.com/wkhtmltopdf/wkhtmltopdf/archive/0.13.zip

    unzip
    0.13.zip

    cd wkhtmltopdf
    -0.13

    sudo apt
    -get install python openssl build-essential libssl-dev libxrender-dev git-core libx11-dev libxext-dev libfontconfig1-dev libfreetype6-dev fontconfig ttf-mscorefonts-installer -y

    sudo scripts
    /build.py setup-schroot-generic

    scripts
    /build.py linux-generic-amd64
Can someone please tell me what I'm missing?

Thank you





        kulkarn...@gmail.com

        unread,
        Nov 17, 2016, 11:26:09 AM11/17/16
        to Cristian Ghezzi, wkhtmltopdf General

        You need to follow instructions in INSTALL.md, need to clone using git –recurse-submodules.

         

        Sent from my Windows 10 phone

        --
        ===================================================
        You received this message because you are subscribed to the "wkhtmltopdf General" group.
        To post to this group, send email to wkhtmltop...@googlegroups.com
        To unsubscribe from this group, send email to wkhtmltopdf-gen...@googlegroups.com
         
        For more options, visit this group at
        http://groups.google.com/group/wkhtmltopdf-general?hl=en?hl=en
        ---
        You received this message because you are subscribed to the Google Groups "wkhtmltopdf General" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to wkhtmltopdf-gen...@googlegroups.com.
        For more options, visit https://groups.google.com/d/optout.

         

        Cristian Ghezzi

        unread,
        Nov 17, 2016, 1:03:12 PM11/17/16
        to wkhtmltopdf General
        Thank you Ashish Kulkarni, getting the sources from git solved the problem.

        Andre Blazko

        unread,
        Nov 29, 2016, 1:10:01 PM11/29/16
        to wkhtmltopdf General
        Hi @Cristian, it seems that you figured it out to how to set up properly your wkhtmltopdf in Ubuntu.

        I need to install it in a Ubuntu 14.05, and I'm also not sure if it is mandatory to install xvfb in my case. 

        Could you give some help on the command lines to install it correctly? I'm pretty noobie in unix.

        I appreciate in advance!

        Cristian Ghezzi

        unread,
        Nov 29, 2016, 1:28:23 PM11/29/16
        to wkhtmltopdf General
        On Ubuntu 14 you don't need to build from sources: just download the official binaries.
        This worked for me (downloading the alpha version):

        wget https://bitbucket.org/wkhtmltopdf/wkhtmltopdf/downloads/wkhtmltox-0.13.0-alpha-7b36694_linux-trusty-amd64.deb

        apt-get install  libxfont1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils

        sudo dpkg -i wkhtmltox.deb


        You need xvfb only when using the alpha version (as in the example above). It can be installed with

        sudo apt install xvfb

        then you use it like

        xvfb-run wkhtmltopdf

        m3w wan

        unread,
        Jul 9, 2020, 4:16:54 AM7/9/20
        to wkhtmltopdf General
        Hi @Cristian,

        Could you please guide me detail instruction. I would like to get alpha 13 on Ubuntu 18.04.

        I get the error
         File "scripts/build.py", line 587, in <module>
            def get_registry_value(key, value=None, hive=winreg.HKEY_LOCAL_MACHINE):
        NameError: name 'winreg' is not defined



        Cristian Ghezzi

        unread,
        Jul 9, 2020, 4:31:38 AM7/9/20
        to wkhtmltopdf General
        I have no idea but it looks like it's trying to build for Windows, not Linux.
        I can't help you anymore because I stopped using this software. I switched to Puppeteer (aka "Headless Chrome") for PDF generation.
        Reply all
        Reply to author
        Forward
        0 new messages