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
- Log in to your server over SSH as root.
- Install the package that holds the library:
On older systems such as CentOS 7, usednf install libXau -yyum install libXau -yinstead. That system is old, and newer versions work in a similar way. - Run your program again.
Steps on Ubuntu or Debian
- Log in as root or a sudo user.
- Refresh the software list and install the package:
sudo apt update sudo apt install libxau6 -y - 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.
- On AlmaLinux, Rocky or CentOS run:
dnf install libXau.i686 -y - On Ubuntu run:
You may need to runsudo apt install libxau6:i386 -ysudo dpkg --add-architecture i386first.
Find out what else is missing
- Run this command with the path of your program:
It lists all libraries the program needs.ldd /path/to/program - Look for lines that say
not found. - 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.
Quick recap
- The error means a needed library file is missing.
- Install
libXauwithdnforlibxau6withapt. - Use the 32-bit version for 32-bit programs.
- Use
lddto find other missing libraries.