Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QtWebEngine not available through Centos 7 (yum) and Ubuntu 14.04 (apt-get)



  • I am in a bit of a pickle regarding QtWebEngine installation using yum on Centos 7 and apt-get on Ubuntu 14.04. I do not see QtWebEngine or QtWebEngineWidgets available for installation at all. I am deploying an application so for the dependencies I can't do a manual installation of Qt 5.8 which does have QWebEngine...I need to deploy using apt-get or yum.

    You can see below QWebEngine is unavailable in Centos 7 and Ubuntu 14.04.

    CentOS 7

    $ sudo yum list qt5-qtwebengine*
    Loaded plugins: fastestmirror, langpacks
    Loading mirror speeds from cached hostfile
     * base: mirror.sfo12.us.leaseweb.net
     * extras: mirror.sfo12.us.leaseweb.net
     * updates: mirror.keystealth.org
    Error: No matching Packages to list
    

    Ubuntu 14.04

    $ sudo apt-cache search libqt5web*
    libqt5webkit5 - Web content engine library for Qt
    libqt5webkit5-dbg - Web content engine library for Qt - debugging symbols
    libqt5webkit5-dev - Web content engine library for Qt - development files
    libqt5webkit5-qmlwebkitplugin - Qt WebKit QML plugin
    
    

    What are my options with respect to a workaround?


  • Lifetime Qt Champion

    @anshah The only option I see is to use a more recent Qt version containing QtWebEngine and distribute your app together with all used Qt libraries. See https://doc.qt.io/qt-5/linux-deployment.html This way you would not depend on Qt version provided by the Linux distribution.



  • Thanks for your reply. So there are two parts to my question.

    1. So Qt 5.8 is the most recent version that works but the problem is that it is only available via manual install. As per my deployment requirements I need to install using the apt-get or yum respositories depending on the type of Linux distribution. The problem is that apt-get or yum do not offer Qt 5.8 and they definitely do not offer QWebEngine for the Ubuntu and Centos/RHEL version that we need to support. Is there anyway to get QWebEngine on these using apt-get / yum.

    2. I have been to that link for linux deployment that you referred to and my problem is that I am integrating Qt code with existing non-Qt code base so I compile using a regular Makefile. I am not using qmake. Is there a way I can integrate my Makefile for the linux deployment? Not sure how I can go about doing this...if you know of a way that would be extremely helpful.



  • @anshah
    Correct me if I'm wrong. Since QtWebEngine stuff was not around at Ubuntu 14.04 time, you're not going to find an apt-get for it? From what I have seen (Ubuntu), a release gets made at the time of a certain (hopefully stable) Qt version, and that's what you get in the repositories. If you want a newer version, you often have to compile it for yourself (which I don't do), or move on to a later Linux release.

    I started briefly at Ubuntu 14.04, moved on to Ubuntu 16.04. IIRC, QtWebEngine was not yet available in the former but was in the latter, and I was able to apt-get the run-time libraries for it then.



  • @JonB
    So for Ubuntu 14.04 I did look around forums and QWebEngine libraries were available via the ethereum repository.

    https://ethereum.gitbooks.io/frontier-guide/content/installing_linux.html

    So the instructions are:

    sudo apt-get install software-properties-common
    sudo add-apt-repository -y ppa:ethereum/ethereum
    sudo add-apt-repository -y ppa:ethereum/ethereum-dev
    sudo apt-get update
    sudo apt-get install ethereum
    

    I have tried this in the past and have been able to access QWebEngine which solves my problem but occasionally it doesn't recognize the repository name let's say if I'm on a VM. Is ethereum a non-official repository? Is it ok to use?



  • @anshah
    You know more than I do! I have never added to the repository search path, only ever stuck with whatever comes with unaltered apt-get.



  • @JonB
    So to summarize my problem...I'm developing an application to be compatible with:

    • Ubuntu 14.04+
    • CentOS 7+
    • RHEL 7+

    The latest Qt version for the manual download for Ubuntu 14.04 is Qt 5.8 which contains QWebEngine. The problem is that it was decided we don't want the customer to download the manual install of Qt 5.8 because of the extra steps. So I have to either do apt-get or yum based on the Linux distribution. So the problem as we have been discussing is that Ubuntu 14.04, and 16.04 do not have QWebEngine packages in apt-get.

    Here are two workaround solutions for Ubuntu 14.04 and Ubuntu 16.04 let me know what you think:

    • Create another version of my application downgraded with QWebKit instead of QWebEngine. My only concern is the QWebKit is obsolete and dated and will it be able to function like QWebEngine.

    • I can tar the Qt WebEngine libraries from the manual install and include it as 3rd party libraries. Is this legal license wise? Do you guys know which version of Qt each Ubuntu version uses? 14.04? 16.04? latest?


  • Lifetime Qt Champion

    @anshah said in QtWebEngine not available through Centos 7 (yum) and Ubuntu 14.04 (apt-get):

    I can tar the Qt WebEngine libraries from the manual install and include it as 3rd party libraries. Is this legal license wise?

    Yes it is and I already suggested to deploy your app with all needed libraries - in this case the user doesn't even have to bother with apt-get or yum.

    "Do you guys know which version of Qt each Ubuntu version uses? 14.04? 16.04? latest?" - you can easily check that, just take a look at what is in Ubuntu official repositories.

    Also note that Ubuntu 14.04 is not supported by Canonical anymore!



  • @jsulm
    Again thanks for your help.
    I looked at the Linux deploy link and understand it a bit more. Just one more (hopefully) last question:

    In the shared libraries section these were list as components in the example:

    Component	                        File Name
    
    The executable	                        plugandpaint
    The script to run the executable	plugandpaint.sh
    The Basic Tools plugin	                plugins\libpnp_basictools.so
    The ExtraFilters plugin	                plugins\libpnp_extrafilters.so
    The Qt xcb platform plugin	        platforms\libqxcb.so
    The Qt Core module	                libQt5Core.so.5
    The Qt GUI module	                libQt5Gui.so.5
    The Qt Widgets module	                libQt5Widgets.so.5
    

    If I include these Qt libraries in a directory and run the script using an executable setting the LD_LIBRARY_PATH then it should be good to run on any distribution? Is this what you meant by deploying with all needed libraries?


  • Lifetime Qt Champion

    @anshah said in QtWebEngine not available through Centos 7 (yum) and Ubuntu 14.04 (apt-get):

    it should be good to run on any distribution?

    Well, there is no guarantee it will run on each and every Linux distribution. There are more dependencies like glibc. It can happen that your deployed app will not run on some Linux distributions because it was build on a distribution too different from them. You will have to test. You can use virtual machines with all required Linux distributions where you can test. Also, you can build for each distribution and deploy to avoid such issues. For example: build/deploy on Ubuntu 14.04, build and deploy on CentOS,...



  • @jsulm
    I'm mainly planning to include the Qt libraries. Other libraries and dependencies I was going to install via the apt-get or yum. I'll give this a try today and let you guys know progress.



  • @jsulm
    @JonB
    @Qt-Champions-2018
    I am much closer than before. As a test from the Qt5.8 libraries I copied all the library files I need and put it into a libs directory in my home folder and then set LD_LIBRARY_PATH to this folder. I uninstalled Qt 5.8 and checked the "ldd ./MyGuiApp" and looks like all the libraries I need are found.

    So the first time around I tried running and received the following error:

    $ ./MyGuiApp
    This application failed to start because it could not find or load the Qt platform plugin "xcb"
    in "".
    
    Reinstalling the application may fix this problem.
    Aborted (core dumped)
    

    Then I made sure I have all the files from the plugins/platform directory in my library folder and set QT_QPA_PLATFORM_PLUGIN_PATH to this folder.

    Now I get the following and I'm still stuck:

    $ ./MyGuiApp
    QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
    Aborted (core dumped)
    

    I made sure I preserved all the symbolic links before copying the library files over and also copied over the following library files:

    libqxcb-glx-integration.so
    libqxcb-egl-integration.so
    

    I still have the same GLX EGL error above.

    I've tried everything but not sure if I missed anything or if I'm doing somethng wrong.
    As a control I tested running MyApp with the Qt 5.8 manual installed and it started with no issues displaying the GUI.
    Any help would be most appreciated.

    Configuration: Ubuntu 14.04 running on VMWare Fusion on a MAC.


  • Lifetime Qt Champion

    @anshah Did you copy xcbglintegrations directory like described here: https://github.com/probonopd/linuxdeployqt/issues/150 ?
    This tool could simplify your life: https://github.com/probonopd/linuxdeployqt


Log in to reply