1

Lyx won't launch. The only error message it gives me is:

lyx: symbol lookup error: lyx: undefined symbol: _ZN17QAbstractItemView11eventFilterEP7QObjectP6QEvent, version Qt_5

Lyx has been taking my mental sanity for 2 days now, and I'm about to lose it. Please, help.

I'm using Ubuntu 20.04.1 LTS

Lyx version: lyx/focal,now 2.3.5.2-1~focal~ppa1 amd64

  • Qt packages installed: apt list --installed | grep qt
libqt5core5a/focal,now 5.12.8+dfsg-0ubuntu1 amd64 [installed,automatic]
libqt5dbus5/focal,now 5.12.8+dfsg-0ubuntu1 amd64 [installed,automatic]
libqt5gui5/focal,now 5.12.8+dfsg-0ubuntu1 amd64 [installed,automatic]
libqt5network5/focal,now 5.12.8+dfsg-0ubuntu1 amd64 [installed,automatic]
libqt5svg5/focal,now 5.12.8-0ubuntu1 amd64 [installed,automatic]
libqt5widgets5/focal,now 5.12.8+dfsg-0ubuntu1 amd64 [installed,automatic]
qt5-gtk-platformtheme/focal,now 5.12.8+dfsg-0ubuntu1 amd64 [installed,automatic]
qttranslations5-l10n/focal,focal,now 5.12.8-0ubuntu1 all [installed,automatic]

Does anyone have a suggestion on how to solve this?


Edits

  • Output of apt-cache policy lyx
lyx:
  Installed: 2.3.4.2-2
  Candidate: 2.3.4.2-2
  Version table:
 *** 2.3.4.2-2 500
        500 http://br.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
        100 /var/lib/dpkg/status
  • Repositories: grep ^deb -r /etc/apt --include=*.list
/etc/apt/sources.list:deb http://br.archive.ubuntu.com/ubuntu/ focal main restricted
/etc/apt/sources.list:deb http://br.archive.ubuntu.com/ubuntu/ focal-updates main restricted
/etc/apt/sources.list:deb http://br.archive.ubuntu.com/ubuntu/ focal universe
/etc/apt/sources.list:deb http://br.archive.ubuntu.com/ubuntu/ focal-updates universe
/etc/apt/sources.list:deb http://br.archive.ubuntu.com/ubuntu/ focal multiverse
/etc/apt/sources.list:deb http://br.archive.ubuntu.com/ubuntu/ focal-updates multiverse
/etc/apt/sources.list:deb http://br.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu focal-security main restricted
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu focal-security universe
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu focal-security multiverse
/etc/apt/sources.list.d/google-chrome.list:deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
/etc/apt/sources.list.d/rock-core-ubuntu-qt4-focal.list:deb http://ppa.launchpad.net/rock-core/qt4/ubuntu focal main
  • output for dpkg -l | grep ppa
ii  apparmor                 2.13.3-7ubuntu5.1      amd64   user-space parser utility for AppArmor
ii  libapparmor1:amd64       2.13.3-7ubuntu5.1      amd64   changehat AppArmor library
ii  ppa-purge                0.2.8+bzr63            all     disables a PPA and reverts to official packages
ii  printer-driver-pnm2ppa   1.13+nondbs-0ubuntu6   amd64   printer driver for HP-GDI printers
  • output for dpkg -l | grep -i libQt5Widgets
ii  libqt5widgets5:amd64     5.12.8+dfsg-0ubuntu1   amd64   Qt 5 widgets module
  • output for sudo find / -name libQt5Widgets* -type f
find: ‘/run/user/1000/doc’: Permission denied
find: ‘/run/user/1000/gvfs’: Permission denied
/usr/local/lib/libQt5Widgets.so.5
/usr/local/Wolfram/Mathematica/12.1/SystemFiles/Components/WSMCore/SystemModeler/SystemFiles/Libraries/Linux-x86-64/libQt5Widgets.so.5
/usr/local/Wolfram/Mathematica/12.1/SystemFiles/Libraries/Linux-x86-64/Qt/lib/libQt5Widgets.so.5
/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.12.8
/home/lima/.local/share/Trash/info/libQt5Widgets.so.5.10.1.trashinfo
/home/lima/.local/share/Trash/info/libQt5Widgets.so.5.trashinfo
/home/lima/.local/share/Trash/info/libQt5Widgets.so.5.10.trashinfo
/home/lima/.local/share/Trash/info/libQt5Widgets.so.trashinfo
/home/lima/.local/share/Trash/files/libQt5Widgets.so.5
/home/lima/.local/share/Trash/files/l_mkl_2020.3.279/pset/32e/qt/libQt5Widgets.so.5.12.8
  • output for which lyx :
/usr/bin/lyx
  • output for lyx --version
lyx: symbol lookup error: lyx: undefined symbol: _ZN17QAbstractItemView11eventFilterEP7QObjectP6QEvent, version Qt_5
  • output for ldd $(which lyx)
linux-vdso.so.1 (0x00007ffd600a8000)
    libmythes-1.2.so.0 => /lib/x86_64-linux-gnu/libmythes-1.2.so.0 (0x00007ff29c583000)
    libenchant-2.so.2 => /lib/x86_64-linux-gnu/libenchant-2.so.2 (0x00007ff29c575000)
    libmagic.so.1 => /lib/x86_64-linux-gnu/libmagic.so.1 (0x00007ff29c54d000)
    libz.so.1 => /usr/local/lib/libz.so.1 (0x00007ff29c331000)
    libQt5Svg.so.5 => /usr/local/lib/libQt5Svg.so.5 (0x00007ff29c2d9000)
    libQt5Widgets.so.5 => /usr/local/lib/libQt5Widgets.so.5 (0x00007ff29bc93000)
    libQt5Gui.so.5 => /usr/local/lib/libQt5Gui.so.5 (0x00007ff29b6d1000)
    libQt5Core.so.5 => /lib/x86_64-linux-gnu/libQt5Core.so.5 (0x00007ff29b188000)
    libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007ff29afa7000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff29ae58000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ff29ae3d000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff29ac4b000)
    /lib64/ld-linux-x86-64.so.2 (0x00007ff29d54d000)
    libgmodule-2.0.so.0 => /lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007ff29ac43000)
    libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007ff29ab1a000)
    liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007ff29aaf1000)
    libbz2.so.1.0 => /usr/local/lib/libbz2.so.1.0 (0x00007ff29a8dd000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff29a8ba000)
    libGL.so.1 => /lib/x86_64-linux-gnu/libGL.so.1 (0x00007ff29a832000)
    libpng16.so.16 => /usr/local/lib/libpng16.so.16 (0x00007ff29a5ef000)
    libicui18n.so.66 => /lib/x86_64-linux-gnu/libicui18n.so.66 (0x00007ff29a2f0000)
    libicuuc.so.66 => /lib/x86_64-linux-gnu/libicuuc.so.66 (0x00007ff29a10a000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff29a104000)
    libpcre2-16.so.0 => /lib/x86_64-linux-gnu/libpcre2-16.so.0 (0x00007ff29a081000)
    libdouble-conversion.so.3 => /lib/x86_64-linux-gnu/libdouble-conversion.so.3 (0x00007ff29a069000)
    libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007ff299ff6000)
    libGLdispatch.so.0 => /lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007ff299f3e000)
    libGLX.so.0 => /lib/x86_64-linux-gnu/libGLX.so.0 (0x00007ff299f0a000)
    libicudata.so.66 => /lib/x86_64-linux-gnu/libicudata.so.66 (0x00007ff298449000)
    libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007ff29830a000)
    libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007ff2982e0000)
    libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007ff2982da000)
    libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007ff2982d2000)
    libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007ff2982b8000)

lima
  • 13
  • 3
  • Ever looked here?. You may search before asking ;-) – kanehekili Oct 01 '20 at 20:59
  • Hey @kanehekili. Thanks for the suggestion, but I've already been there. It did not work... :T any other tip? – lima Oct 01 '20 at 22:07
  • Please add output of apt-cache policy lyx to the question. – N0rbert Oct 02 '20 at 05:59
  • Why are there Qt5 libraries in your Ubuntu system? Did you add another desktop environment, kubuntu-desktop or lubuntu-desktop? Or did lyx pull in those libraries? -- What about trying the version of lyx from Ubuntu's repository Universe, version 2.3.4.3-2? It might work better than the version from the PPA. – sudodus Oct 03 '20 at 17:59
  • @N0rbert I've added the output you suggested. Please let me know if you get a chance to take a look at it and if gives you any idea – lima Oct 04 '20 at 20:52
  • 1
    @sudodus It seems to me that Qt5 libraries are dependancies of lyx and that could be why they're there (but I do have other applications e.g. Paraview that use Qt5 and may have put them there first). I tried version 2.3.4.3-2 once I noticed lyx 2.3.5 wasn't working... Got the same error message. – lima Oct 04 '20 at 20:54
  • Please add all your repositories to the question by executing grep ^deb -r /etc/apt/ --include=*.list and dpkg -l | grep ppa, and update command output for apt-cache policy lyx . – N0rbert Oct 05 '20 at 14:16
  • @N0rbert I've added the info you asked to the question. Thanks – lima Oct 06 '20 at 17:49
  • I can't reproduce the problem on fresh 20.04.1 LTS with ppa:rock-core/qt4. Please add output of dpkg -l | grep -i libQt5Widgets, sudo find / -name libQt5Widgets* -type f, which lyx, lyx --version and ldd $(which lyx) to the question. – N0rbert Oct 06 '20 at 20:23
  • @N0rbert I've added the new outputs – lima Oct 06 '20 at 20:52
  • by the way, I don't need the ppa:rock-core/qt4. I downloaded it in an attempt to get it working with Qt4. Following the suggestion from here – lima Oct 06 '20 at 20:55
  • 1
    @lime, follow updated answer. You have to remove libraries from /usr/local/lib/, as they are not controlled by APT and will cause unpredictable behavior as you already see. – N0rbert Oct 07 '20 at 05:51

1 Answers1

1

You have trashed your system by using locally installed Qt5 libraries.
They came from some compilation and not from deb-packages.
So you need to remove such libraries and then LyX will work:

sudo rm /usr/local/lib/libQt5Widgets.so.5
sudo rm /usr/local/lib/libQt5Svg.so.5
sudo rm /usr/local/lib/libQt5Gui.so.5

Also I would recommend to remove other libraries from the /usr/local/lib as they are not controlled by APT, so you will suffer with next problems. Remove LyX related libs with:

sudo rm /usr/local/lib/libz.so.1
sudo rm /usr/local/lib/libbz2.so.1.0
sudo rm /usr/local/lib/libpng16.so.16

Careful review of /usr/local/lib/ contents may be also useful.


You have to remove LyX's PPA to avoid Qt-dependency problems:

sudo apt-get install ppa-purge
sudo ppa-purge ppa:lyx-devel/release

and then reinstall LyX for sure with:

sudo apt-get install --reinstall lyx
N0rbert
  • 99,918
  • Still getting the same error message... But thanks for the help anyway @N0rbert. If you get any other ideas, please let me know.

    I haven't found many posts on problems with lyx on ubuntu 20.04. I'm fairly convinced that the problem is something I've done wrong, even though I can't even imagine what could be the culprit

    – lima Oct 05 '20 at 13:30
  • 1
    I followed your answer and at least moved on from the initial error message. Also, paraview stopped working once I did that, so at least I now where I failed now (which makes sense, since that's the one package related to Qt5 that I rsync'd into the system).

    I decided to just reinstall ubuntu. And do it more carefully this time. Lost a day working on that, but we got a 3 day weekend this week in Brazil.

    Thanks a lot for the help @N0rbert you are an awesome person and very helpful! I'll mark your answer as solution since it showed me where it all went wrong.

    – lima Oct 11 '20 at 16:36
  • Hey @N0rbert, any chance I can still reach you? After 3 days of peaceful coexistence between Lyx 2.3.5.2 and Paraview 5.8.1, I just installed Mendeleydesktop 1.19.6 and I brought me back to the exact error message I started. Maybe now you can reproduce the error on your machine. – lima Oct 13 '20 at 18:03
  • My main concern is about some more local libraries. You have to check contents of /usr/local/lib by ls -R /usr/local/lib or manually. – N0rbert Oct 13 '20 at 19:46