The NVIDIA EGL Libraries allow the EGL drivers for the NVIDIA driver to function properly. If you are not installing NVIDIA-575.57.08, skip this package.
GBM (GBM from Mesa-25.1.2 or Mesa-25.1.2), libdrm-2.4.125, libglvnd-1.7.0, Wayland-1.23.1, Wayland-Protocols-1.45, and Xorg Libraries
First, create a list of files to be downloaded:
cat > nvidia-egl-list << "EOF"
eglexternalplatform/archive/1.2.1/eglexternalplatform-1.2.1.tar.gz
egl-gbm/archive/1.1.2.1/egl-gbm-1.1.2.1.tar.gz
egl-wayland/archive/1.1.19/egl-wayland-1.1.19.tar.gz
egl-x11/archive/v1.0.2/egl-x11-1.0.2.tar.gz
EOF
To download the needed files using Wget-1.25.0, use the following commands:
mkdir nvidia-egl && cd nvidia-egl && grep -v '^#' ../nvidia-egl-list | wget -i- -c \ -B https://github.com/NVIDIA/
When installing multiple packages in a script, the installation needs to be done as the root user. There are three general options that can be used to do this:
Run the entire script as the root user (not recommended).
Use the sudo command from the sudo package.
Use su -c "command arguments" (quotes required) which will ask for the root password for every iteration of the loop.
One way to handle this situation is to create a short bash function that automatically selects the appropriate method. Once the command is set in the environment, it does not need to be set again.
as_root() { if [ $EUID = 0 ]; then $* elif [ -x /usr/bin/sudo ]; then sudo $* else su -c \\"$*\\" fi } export -f as_root
First, start a subshell that will exit on error:
bash -e
Install all of the libraries by running the following commands:
for package in $(grep -v '^#' ../nvidia-egl-list) do package=$(basename "$package") packagedir=${package%.tar.?z*} tar -xf $package pushd $packagedir mkdir build cd build meson setup --prefix=/usr \ --buildtype=release \ .. ninja as_root ninja install popd rm -rf $packagedir as_root /sbin/ldconfig done
Finally, exit the shell that was started earlier:
exit