­

Installing NVIDIA drivers on 64-bit RHEL 6

I got a new machine that had RHEL 6 stuck on it. Installing the NVIDIA drivers caused me just a little grief. After NVIDIA’s driver installer told me the Nouveau driver was in the way, I found these instructions. My steps below are based on these, though I ran into one extra hiccup because I’ve got a 64-bit OS installed:

  1. Installed kernel headers and compiler:
    yum install gcc kernel-devel
    reboot
    
  2. Temporarily changed runlevel in /etc/inittab to 3 instead of 5. After I got everything working I switched this back to get a graphic login manager.
  3. Get Nouveau out of the way:

    sed -i '/root=/s|$| rdblacklist=nouveau vga=791|' /boot/grub/grub.conf
    echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf
    mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname  -r)-nouveau.img
    dracut /boot/initramfs-$(uname -r).img $(uname -r)
    yum remove xorg-x11-drv-nouveau
    reboot
    
  4. Ran the installer with no X server running:

    sh ./NVIDIA-Linux-x86_64-SOME-VERSION-OR-OTHER.run
    

    It failed with this message:

    Could not compile 'gcc-version-check.c'. Please be
    sure you have your Linux distribution's gcc and libc
    development packages installed.
    
  5. I scratched my head and went to sleep.
  6. The next day I unpacked the installer with:
    sh ./NVIDIA-Linux-x86_64-SOME-VERSION-OR-OTHER.run -x
    
  7. I looked in kernel/confest and found where gcc-version-check.c was compiled. I tried compiling it myself with

    gcc gcc-version-check.c -o gcc-version-check
    

    and I got this output:

    /usr/include/gnu/stubs.h:9:27: error: gnu/stubs-64.h: No such file or directory
    

    A little sleuthing showed that stubs-64.h is included in glibc-devel, which I needed to install

    yum install glibc-devel
    
  8. And then:

    sh ./NVIDIA-Linux-x86_64-SOME-VERSION-OR-OTHER.run
    
Posted in graphics
2 comments on “Installing NVIDIA drivers on 64-bit RHEL 6
  1. Ricky says:

    Hey Admin!

    You have written a Great) post here.
    Appreciate your knowledge.

    Thanks!

  2. suner says:

    Ver nice and usefull post , it is really great and it helps me alot , Thanks for your great effort

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>