Cs · Computer Science

How to Fix TeXstudio Not Starting After an Ubuntu 16.04 Upgrade

Published By the 9to5Science editorial team

At a glance

  1. 1. Read the error

    Start TeXstudio from a terminal and note the exact message; it usually points to the failing component.

  2. 2. Check the installation

    Confirm which TeXstudio executable runs, then reinstall the Ubuntu package if it is damaged or inconsistent.

  3. 3. Test Qt settings

    Try launching with Qt plugin path variables unset if the error mentions a platform plugin.

  4. 4. Check dependencies

    Look for missing shared libraries and install the package that provides any library reported as missing.

If TeXstudio stops opening after an Ubuntu 16.04 upgrade, the upgrade may have left the application, one of its Qt libraries, or its Qt plugin configuration in an inconsistent state. There is no single fix that applies to every case: a missing-library error, a Qt platform-plugin error, and a silent crash point to different problems.

Start TeXstudio from a terminal and use its output to choose the relevant check below. These steps are for the Ubuntu 16.04 (Xenial) package setup; that Ubuntu release is no longer supported, so its package repositories may not be available or receive security updates.

1. Get the error message

Open a terminal and run:

texstudio

If the command is not found, check whether the package is installed:

dpkg -l texstudio

A line beginning with ii indicates that the package is installed. If the terminal prints an error when you run texstudio, keep the complete message. In particular, look for phrases such as “Could not load the Qt platform plugin,” “error while loading shared libraries,” or a crash report. If the terminal gives no useful output, try the later checks and launch again.

2. Reinstall the Ubuntu package

If TeXstudio is installed from Ubuntu’s package manager, refresh package information and reinstall it:

sudo apt update
sudo apt install --reinstall texstudio

This replaces files belonging to the TeXstudio package while retaining your user settings. If apt update reports that Xenial repositories cannot be reached, or that the release has no Release file, the problem is with the old repository configuration rather than TeXstudio itself. Do not add an arbitrary repository or download a package from an untrusted site; use a supported operating system and a trusted package source.

If you installed TeXstudio from a downloaded .deb, an AppImage, or another source, the Ubuntu package command may not repair that copy. Find out which executable is being run:

command -v texstudio

If the result points to an unexpected directory, such as a manually added location under /usr/local, you may have multiple installations. Test the intended copy or remove the duplicate using the method by which it was installed.

3. Fix a Qt platform-plugin error

A message about the xcb platform plugin usually means Qt cannot load the plugin or one of its supporting libraries. First test whether a Qt-related environment variable is forcing TeXstudio to use an incompatible plugin location:

env -u QT_PLUGIN_PATH -u QT_QPA_PLATFORM_PLUGIN_PATH texstudio

If TeXstudio opens this way, the application itself may be fine. A shell startup file or another program may be setting one of those variables. Search your shell configuration files for QT_PLUGIN_PATH and QT_QPA_PLATFORM_PLUGIN_PATH, and remove or correct the setting that points to an incompatible Qt installation. Open a new terminal after changing it and test again.

If it still fails, ask Qt to print plugin-loading diagnostics:

QT_DEBUG_PLUGINS=1 texstudio

The output can show the plugin path Qt is checking and which library it cannot load. Qt’s xcb platform plugin connects Qt applications to the X11 display system; its failure does not by itself mean that the TeX document or TeX distribution is broken. Avoid copying random plugin files into TeXstudio’s directories: mixing Qt versions can create more conflicts.

4. Check for missing shared libraries

If the error says a library is missing, inspect the executable’s linked libraries:

ldd "$(command -v texstudio)" | grep 'not found'

A line ending in not found identifies a dependency that the dynamic linker cannot locate. On Ubuntu, use the library’s package name to install the matching package with apt; package names are not always identical to the library filenames. If the missing library belongs to Qt, reinstalling TeXstudio and its dependencies from the same trusted package source is usually safer than downloading a single library file.

If the command produces no missing-library lines, the executable’s direct dependencies were found. Qt plugins can have their own dependencies, so this does not rule out a missing library used only by the xcb plugin. The QT_DEBUG_PLUGINS=1 output can help identify that case.

5. If it still will not start

Try launching from a fresh user account. If TeXstudio opens there, the cause is likely in your user-specific configuration or environment rather than the system installation. Back up your TeXstudio settings before renaming or resetting them; their location can vary by TeXstudio version and desktop setup. If it fails in a fresh account too, save the terminal output and use it to investigate the installed package and Qt dependencies.

Common mistakes

  • Treating every startup failure as a TeX problem. TeXstudio can fail before it ever runs a compiler; a Qt or shared-library error is a system-level startup issue.
  • Reinstalling TeX Live first. A broken TeX distribution generally affects document compilation, not whether the TeXstudio window opens.
  • Deleting settings immediately. A settings reset can help with a user-specific fault, but it will not repair a missing system library. Back up settings before changing them.
  • Mixing Qt installations. Plugin files from different Qt versions or package sources can make the plugin loader fail even when the files exist.
  • Ignoring the exact error. The terminal output is more useful than repeatedly reinstalling packages without knowing which component failed.

References

  1. Qt 5: Platform Abstraction

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.