Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Fix "error while loading shared libraries: libXau.so.6"

This guide helps you fix an error that appears when a program cannot start because a library file called libXau.so.6 is missing. It needs root access.

VPS and Cloud Servers2 min read11 steps

What does the error mean?

A shared library is a file with ready-made code that many programs borrow. It is like a tool in a shared toolbox. If a tool is missing, a program that needs it cannot work.

The library libXau.so.6 belongs to the X Window System, which draws windows on screens. Some programs need it even on a server with no screen. These can be tools such as wkhtmltopdf, browsers used for screenshots, or older software.

The full error looks like this:

error while loading shared libraries: libXau.so.6: cannot open shared object file: No such file or directory

Steps on AlmaLinux, Rocky Linux, CentOS or RHEL

  1. Log in to your server over SSH as root.
  2. Install the package that holds the library:
    dnf install libXau -y
    On older systems such as CentOS 7, use yum install libXau -y instead. That system is old, and newer versions work in a similar way.
  3. Run your program again.

Steps on Ubuntu or Debian

  1. Log in as root or a sudo user.
  2. Refresh the software list and install the package:
    sudo apt update
    sudo apt install libxau6 -y
  3. Run your program again.

If you run a 32-bit program on a 64-bit system

Some old programs are 32-bit. They need the 32-bit copy of the library.

  1. On AlmaLinux, Rocky or CentOS run:
    dnf install libXau.i686 -y
  2. On Ubuntu run:
    sudo apt install libxau6:i386 -y
    You may need to run sudo dpkg --add-architecture i386 first.

Find out what else is missing

  1. Run this command with the path of your program:
    ldd /path/to/program
    It lists all libraries the program needs.
  2. Look for lines that say not found.
  3. Install the package for each missing item.

If you do not know which package holds a file on a Red Hat style system, run dnf provides "*/libXau.so.6". It tells you the package name.

Tip: Install packages only from your system's own software sources. Do not download library files from random websites. They could be harmful.

Quick recap

  • The error means a needed library file is missing.
  • Install libXau with dnf or libxau6 with apt.
  • Use the 32-bit version for 32-bit programs.
  • Use ldd to find other missing libraries.