Created
November 3, 2021 02:53
Star
You must be signed in to star a gist
Install 32 bit nvidia gl driver
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://askubuntu.com/a/1337205/294281 | |
import os | |
import stat | |
import glob | |
from pathlib import Path | |
import shutil | |
if __name__=="__main__": | |
ver = "495.29.05" | |
pth = "/home/tim/Downloads/NVIDIA-Linux-x86_64-{}.run".format(ver) | |
f = Path(pth) | |
f.chmod(f.stat().st_mode | stat.S_IEXEC) | |
os.system(pth+" -x") | |
pth2 = "./NVIDIA-Linux-x86_64-{}/32".format(ver) | |
fiPatterns = ["libEGL*", "libGLESv*", "libGLX*", "libnvidia-egl*", "libnvidia-gl*","libnvidia-tls*"] | |
for fiPattern in fiPatterns: | |
for file in glob.glob(pth2+"/"+fiPattern): | |
print(file) | |
shutil.copy(file, "/usr/lib32") | |
os.chdir('/usr/lib32') | |
os.symlink("libEGL_nvidia.so.{}".format(ver), "libEGL_nvidia.so.0") | |
os.symlink("libGLESv1_CM_nvidia.so.{}".format(ver), "libGLESv1_CM_nvidia.so.1") | |
os.symlink("libGLESv2_nvidia.so.{}".format(ver), "libGLESv2_nvidia.so.2") | |
os.symlink("libGLX_nvidia.so.{}".format(ver), "libGLX_indirect.so.0") | |
os.symlink("libGLX_nvidia.so.{}".format(ver), "libGLX_nvidia.so.0") | |
os.system("ldconfig") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment