Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Texworks stopped working on Ubuntu #1047

Open
erikv85 opened this issue Mar 18, 2024 · 6 comments
Open

Texworks stopped working on Ubuntu #1047

erikv85 opened this issue Mar 18, 2024 · 6 comments
Labels

Comments

@erikv85
Copy link

erikv85 commented Mar 18, 2024

Bug description:

When starting texworks via OS's gui, nothing happens. When trying to start from terminal, I get:

$ texworks 
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Aborted (core dumped)

With QT_DEBUG_PLUGINS=1 I get:

$ texworks 
QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/x86_64-linux-gnu/qt6/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ...
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Aborted (core dumped)

Last time I used Texworks was Feb 13. Reinstalling (remove, purge, autoremove, install) did not fix the problem.

I realize this probably isn't texworks' doing, but I don't know what I myself might have done (apart from apt upgrade) that's caused this, nor how to fix it, so thought I'd check here first.

Thanks.

Steps to reproduce the problem:

N/A

Expected behavior:

Texworks should start.

General information:
TeXworks version: unknown
TeXworks obtained from: Apt
Operating system: Ubuntu 22.04.4 LTS

Additional information:

@erikv85 erikv85 added the bug label Mar 18, 2024
@stloeffler
Copy link
Member

Thanks for reporting. I seem to remember having a similar problem in the past when running automated builds. However, I can't reproduce the issue on a fresh install right now.
Could you post the output of the following commands?

  1. apt-cache policy texworks to see which exact version from which repo is installed
  2. env | grep XDG_SESSION to check whether you are running X11 or wayland
  3. ldd /usr/bin/texworks to see which libraries texworks is using
  4. ls /usr/lib/x86_64-linux-gnu/qt*/plugins/platforms/libqxcb.* to see if the xcb library is available
  5. ldd /usr/lib/x86_64-linux-gnu/qt*/plugins/platforms/libqxcb.* to see if there are any immediate broken references

BTW: I noticed that your error message mentions Qt6, yet the ppa version of TeXworks for 22.04 is built with Qt5 (as libpoppler-qt6 is not available in the jammy repos). Maybe you have a Qt5 vs Qt6 mismatch going on?

@erikv85
Copy link
Author

erikv85 commented Mar 22, 2024

Thanks @stloeffler . Indeed my best guess is that it's Qt version mismatch, I don't know how that might've happened though. Here are the outputs you asked for:

texworks:
  Installed: 0.6.9~202402120637~git~68a2e99c-1jammy
  Candidate: 0.6.9~202402120637~git~68a2e99c-1jammy
  Version table:
 *** 0.6.9~202402120637~git~68a2e99c-1jammy 500
        500 https://ppa.launchpadcontent.net/texworks/stable/ubuntu jammy/main amd64 Packages
        100 /var/lib/dpkg/status
     0.6.6-2build1 500
        500 http://se.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
XDG_SESSION_DESKTOP=ubuntu
XDG_SESSION_TYPE=x11
XDG_SESSION_CLASS=user
	linux-vdso.so.1 (0x00007ffe403eb000)
	libhunspell-1.7.so.0 => /lib/x86_64-linux-gnu/libhunspell-1.7.so.0 (0x00007fbaec792000)
	libQt5Concurrent.so.5 => /lib/x86_64-linux-gnu/libQt5Concurrent.so.5 (0x00007fbaecdef000)
	libQt5Qml.so.5 => /lib/x86_64-linux-gnu/libQt5Qml.so.5 (0x00007fbaec200000)
	libQt5ScriptTools.so.5 => /lib/x86_64-linux-gnu/libQt5ScriptTools.so.5 (0x00007fbaec6cb000)
	libQt5Script.so.5 => /lib/x86_64-linux-gnu/libQt5Script.so.5 (0x00007fbaebe00000)
	libQt5DBus.so.5 => /lib/x86_64-linux-gnu/libQt5DBus.so.5 (0x00007fbaec16c000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fbaec6af000)
	libpoppler-qt5.so.1 => /lib/x86_64-linux-gnu/libpoppler-qt5.so.1 (0x00007fbaec0e8000)
	libQt5Widgets.so.5 => /lib/x86_64-linux-gnu/libQt5Widgets.so.5 (0x00007fbaeb600000)
	libQt5Gui.so.5 => /lib/x86_64-linux-gnu/libQt5Gui.so.5 (0x00007fbaeae00000)
	libQt5Core.so.5 => /lib/x86_64-linux-gnu/libQt5Core.so.5 (0x00007fbaea800000)
	libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fbaea400000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fbaebd19000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fbaec68f000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fbaea000000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fbaece11000)
	libQt5Network.so.5 => /lib/x86_64-linux-gnu/libQt5Network.so.5 (0x00007fbaea64f000)
	libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007fbaec09a000)
	libQt5Xml.so.5 => /lib/x86_64-linux-gnu/libQt5Xml.so.5 (0x00007fbaebcd3000)
	libfreetype.so.6 => /lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007fbaeb538000)
	libpoppler.so.118 => /lib/x86_64-linux-gnu/libpoppler.so.118 (0x00007fbae9c00000)
	liblcms2.so.2 => /lib/x86_64-linux-gnu/liblcms2.so.2 (0x00007fbaead9e000)
	libGL.so.1 => /lib/x86_64-linux-gnu/libGL.so.1 (0x00007fbaea379000)
	libpng16.so.16 => /lib/x86_64-linux-gnu/libpng16.so.16 (0x00007fbaeb4fd000)
	libharfbuzz.so.0 => /lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007fbaea2aa000)
	libmd4c.so.0 => /lib/x86_64-linux-gnu/libmd4c.so.0 (0x00007fbaec088000)
	libdouble-conversion.so.3 => /lib/x86_64-linux-gnu/libdouble-conversion.so.3 (0x00007fbaeb4e8000)
	libicui18n.so.70 => /lib/x86_64-linux-gnu/libicui18n.so.70 (0x00007fbae9800000)
	libicuuc.so.70 => /lib/x86_64-linux-gnu/libicuuc.so.70 (0x00007fbae9605000)
	libpcre2-16.so.0 => /lib/x86_64-linux-gnu/libpcre2-16.so.0 (0x00007fbae9f76000)
	libzstd.so.1 => /lib/x86_64-linux-gnu/libzstd.so.1 (0x00007fbae9b31000)
	libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fbae94cb000)
	libgssapi_krb5.so.2 => /lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007fbaea256000)
	libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007fbae9404000)
	libbrotlidec.so.1 => /lib/x86_64-linux-gnu/libbrotlidec.so.1 (0x00007fbaec07a000)
	libfontconfig.so.1 => /lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007fbae93ba000)
	libjpeg.so.8 => /lib/x86_64-linux-gnu/libjpeg.so.8 (0x00007fbae9339000)
	libopenjp2.so.7 => /lib/x86_64-linux-gnu/libopenjp2.so.7 (0x00007fbae92e1000)
	libtiff.so.5 => /lib/x86_64-linux-gnu/libtiff.so.5 (0x00007fbae9259000)
	libnss3.so => /lib/x86_64-linux-gnu/libnss3.so (0x00007fbae912c000)
	libsmime3.so => /lib/x86_64-linux-gnu/libsmime3.so (0x00007fbaead74000)
	libplc4.so => /lib/x86_64-linux-gnu/libplc4.so (0x00007fbaebcca000)
	libnspr4.so => /lib/x86_64-linux-gnu/libnspr4.so (0x00007fbae90ec000)
	libGLdispatch.so.0 => /lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007fbae9034000)
	libGLX.so.0 => /lib/x86_64-linux-gnu/libGLX.so.0 (0x00007fbae9000000)
	libgraphite2.so.3 => /lib/x86_64-linux-gnu/libgraphite2.so.3 (0x00007fbaea22f000)
	libicudata.so.70 => /lib/x86_64-linux-gnu/libicudata.so.70 (0x00007fbae7200000)
	libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fbae8f8a000)
	libkrb5.so.3 => /lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007fbae8ebf000)
	libk5crypto.so.3 => /lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007fbae8e90000)
	libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007fbaeb4e2000)
	libkrb5support.so.0 => /lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007fbaead66000)
	liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007fbae8e65000)
	liblz4.so.1 => /lib/x86_64-linux-gnu/liblz4.so.1 (0x00007fbaea62f000)
	libcap.so.2 => /lib/x86_64-linux-gnu/libcap.so.2 (0x00007fbae9f6b000)
	libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007fbae70c2000)
	libbrotlicommon.so.1 => /lib/x86_64-linux-gnu/libbrotlicommon.so.1 (0x00007fbae8e42000)
	libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007fbae7091000)
	libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007fbae9f62000)
	libwebp.so.7 => /lib/x86_64-linux-gnu/libwebp.so.7 (0x00007fbae7024000)
	libjbig.so.0 => /lib/x86_64-linux-gnu/libjbig.so.0 (0x00007fbae8e31000)
	libdeflate.so.0 => /lib/x86_64-linux-gnu/libdeflate.so.0 (0x00007fbae7000000)
	libnssutil3.so => /lib/x86_64-linux-gnu/libnssutil3.so (0x00007fbae6fce000)
	libplds4.so => /lib/x86_64-linux-gnu/libplds4.so (0x00007fbaead61000)
	libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007fbae6e8e000)
	libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007fbae9f5b000)
	libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007fbae6e7a000)
	libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007fbae6e54000)
	libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fbae6e2a000)
	libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007fbaea229000)
	libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007fbae8e29000)
	libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007fbae6e12000)
	libmd.so.0 => /lib/x86_64-linux-gnu/libmd.so.0 (0x00007fbae6e05000)
/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so
	linux-vdso.so.1 (0x00007ffdc558e000)
	libQt5XcbQpa.so.5 => /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5 (0x00007fa347859000)
	libQt5Gui.so.5 => /lib/x86_64-linux-gnu/libQt5Gui.so.5 (0x00007fa347000000)
	libQt5Core.so.5 => /lib/x86_64-linux-gnu/libQt5Core.so.5 (0x00007fa346a00000)
	libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fa346600000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fa346200000)
	libfontconfig.so.1 => /lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007fa34780d000)
	libfreetype.so.6 => /lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007fa347745000)
	libQt5DBus.so.5 => /lib/x86_64-linux-gnu/libQt5DBus.so.5 (0x00007fa346f6c000)
	libX11-xcb.so.1 => /lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007fa347740000)
	libxcb-icccm.so.4 => /lib/x86_64-linux-gnu/libxcb-icccm.so.4 (0x00007fa347739000)
	libxcb-image.so.0 => /lib/x86_64-linux-gnu/libxcb-image.so.0 (0x00007fa347733000)
	libxcb-shm.so.0 => /lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007fa34772c000)
	libxcb-keysyms.so.1 => /lib/x86_64-linux-gnu/libxcb-keysyms.so.1 (0x00007fa347727000)
	libxcb-randr.so.0 => /lib/x86_64-linux-gnu/libxcb-randr.so.0 (0x00007fa347714000)
	libxcb-render-util.so.0 => /lib/x86_64-linux-gnu/libxcb-render-util.so.0 (0x00007fa34770d000)
	libxcb-render.so.0 => /lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007fa3476fe000)
	libxcb-shape.so.0 => /lib/x86_64-linux-gnu/libxcb-shape.so.0 (0x00007fa3476f9000)
	libxcb-sync.so.1 => /lib/x86_64-linux-gnu/libxcb-sync.so.1 (0x00007fa3476ed000)
	libxcb-xfixes.so.0 => /lib/x86_64-linux-gnu/libxcb-xfixes.so.0 (0x00007fa3476e3000)
	libxcb-xinerama.so.0 => /lib/x86_64-linux-gnu/libxcb-xinerama.so.0 (0x00007fa3476de000)
	libxcb-xkb.so.1 => /lib/x86_64-linux-gnu/libxcb-xkb.so.1 (0x00007fa3469e2000)
	libxcb-xinput.so.0 => /lib/x86_64-linux-gnu/libxcb-xinput.so.0 (0x00007fa3469be000)
	libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fa346994000)
	libXrender.so.1 => /lib/x86_64-linux-gnu/libXrender.so.1 (0x00007fa346987000)
	libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007fa346847000)
	libSM.so.6 => /lib/x86_64-linux-gnu/libSM.so.6 (0x00007fa346f5f000)
	libICE.so.6 => /lib/x86_64-linux-gnu/libICE.so.6 (0x00007fa3465e3000)
	libxkbcommon-x11.so.0 => /lib/x86_64-linux-gnu/libxkbcommon-x11.so.0 (0x00007fa34683c000)
	libxkbcommon.so.0 => /lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x00007fa34659c000)
	libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fa346462000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fa346119000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fa346442000)
	libGL.so.1 => /lib/x86_64-linux-gnu/libGL.so.1 (0x00007fa346092000)
	libpng16.so.16 => /lib/x86_64-linux-gnu/libpng16.so.16 (0x00007fa346057000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fa34603b000)
	libharfbuzz.so.0 => /lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007fa345f6c000)
	libmd4c.so.0 => /lib/x86_64-linux-gnu/libmd4c.so.0 (0x00007fa346430000)
	libdouble-conversion.so.3 => /lib/x86_64-linux-gnu/libdouble-conversion.so.3 (0x00007fa345f57000)
	libicui18n.so.70 => /lib/x86_64-linux-gnu/libicui18n.so.70 (0x00007fa345c00000)
	libicuuc.so.70 => /lib/x86_64-linux-gnu/libicuuc.so.70 (0x00007fa345a05000)
	libpcre2-16.so.0 => /lib/x86_64-linux-gnu/libpcre2-16.so.0 (0x00007fa34597b000)
	libzstd.so.1 => /lib/x86_64-linux-gnu/libzstd.so.1 (0x00007fa3458ac000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fa3479f3000)
	libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007fa34587b000)
	libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007fa34682d000)
	libbrotlidec.so.1 => /lib/x86_64-linux-gnu/libbrotlidec.so.1 (0x00007fa345f49000)
	libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007fa34582d000)
	libxcb-util.so.1 => /lib/x86_64-linux-gnu/libxcb-util.so.1 (0x00007fa345f40000)
	libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007fa345f3a000)
	libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007fa345f32000)
	libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007fa345815000)
	libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fa34579f000)
	libGLdispatch.so.0 => /lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007fa3456e7000)
	libGLX.so.0 => /lib/x86_64-linux-gnu/libGLX.so.0 (0x00007fa3456b3000)
	libgraphite2.so.3 => /lib/x86_64-linux-gnu/libgraphite2.so.3 (0x00007fa34568c000)
	libicudata.so.70 => /lib/x86_64-linux-gnu/libicudata.so.70 (0x00007fa343a00000)
	libbrotlicommon.so.1 => /lib/x86_64-linux-gnu/libbrotlicommon.so.1 (0x00007fa345669000)
	libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007fa343939000)
	libmd.so.0 => /lib/x86_64-linux-gnu/libmd.so.0 (0x00007fa34565c000)
	liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007fa345631000)
	liblz4.so.1 => /lib/x86_64-linux-gnu/liblz4.so.1 (0x00007fa343919000)
	libcap.so.2 => /lib/x86_64-linux-gnu/libcap.so.2 (0x00007fa345626000)
	libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007fa3437db000)
	libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007fa3437b5000)

@stloeffler
Copy link
Member

Thanks for the output, @erikv85. At first inspection, this all looks good - texworks only links to Qt5 libs that are all found (i.e., no missing files).
Still, from you original post, it seems that Qt tries to locate libs in a qt6 directory (which seems to either not exist at all or at least not contain libqxcb.so). Therefore, I have a couple of follow-up questions:

  1. Do you use a qt.conf file? E.g. /usr/bin/qt.conf? If so, what is its contents?
  2. What does env | grep QT give (is there any mention of QT_PLUGIN_PATH or similar)?

@erikv85
Copy link
Author

erikv85 commented Mar 24, 2024

I only found one qt.conf file, that seems to have come with my installation of MiniZinc. Its contents are:

$ cat ~/MiniZincIDE-2.7.4-bundle-linux-x86_64/bin/qt.conf 
# generated by linuxdeploy-plugin-qt
[Paths]
Prefix = ../
Plugins = plugins
Imports = qml
Qml2Imports = qml

As for environment variables, I only have

$ env | grep QT
QT_ACCESSIBILITY=1
QT_IM_MODULE=ibus
QT_DEBUG_PLUGINS=1

@stloeffler
Copy link
Member

OK, MiniZinc's qt.conf should not be picked up, as that is in a different directory.
Could you install the qttools5-dev-tools package and post the output of qtpaths --plugin-dir?
As a workaround, does running texworks with the environment variable QT_PLUGIN_PATH="/usr/lib/x86_64-linux-gnu/qt5/plugins/" work?

@erikv85
Copy link
Author

erikv85 commented Oct 6, 2024

Hi again. I installed qttools5-dev-tools, here's the output requested:

$ qtpaths --plugin-dir
/usr/lib/x86_64-linux-gnu/qt5/plugins

Running with the env variable you suggested unfortunately doesn't seem to help,

$ QT_PLUGIN_PATH="/usr/lib/x86_64-linux-gnu/qt5/plugins/" texworks 
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Aborted (core dumped)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants