Ask Your Question

Fedora 24 install CUDA

asked 2016-08-13 15:11:24 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

Hi all,

I am trying to install CUDA on my ASUS X550JX with intel and nvidia gtx 950M graphic cards. I installed bumblebee according to

Then I fixed the daemon error following the first answer in

The first attempt to install CUDA led to the problem that I cannot log into Fedora. I chose to re-install the OS. I searched on this forum but there seems to be no result for Fedora 24. Can anyone point me toward a working guidance of CUDA installation?


edit retag flag offensive close merge delete


What is CUDA?

sigurdsk gravatar imagesigurdsk ( 2016-11-02 08:07:44 -0500 )edit

CUDA is a software development kit that allows you to utilize your NVIDIA GPU for general computing problems. GPUs are high throughput devices, meaning they can process numerous threads very quickly. If you have a calculation that can be performed in parallel, say multiplying every element of a very large array by some constant (as a trivial example), you can use your GPU to do the calculation on many elements at the same time. This can greatly speed up your code. See for more information about CUDA.

Entropy813 gravatar imageEntropy813 ( 2016-11-07 12:09:12 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-10-27 08:27:39 -0500

Entropy813 gravatar image

updated 2016-11-01 10:23:02 -0500

I just finished installing CUDA 8.0 on a laptop with an intel card and a gtx 960M. Here is what I did to get everything to work.

  1. Install bumblebee following the directions here:
    Make sure to reboot and verify that bumblebee is working using
    $ primusrun glxinfo | grep OpenGL or
    $ primusrun glxgears
  2. Download the CUDA 8.0 run file for Fedora 23 even though you are using 24:
  3. Open a terminal and run the install script, replacing the 8.0.44 to match the file you download:
    $ cd Downloads
    $ sudo sh --override
    the --override flag will let you use an unsupported compiler (gcc 6.2.1) when setting up the CUDA SDK
  4. Scroll through the EULA by holding enter (for a long time) then type "accept"
  5. It will tell you that you are using an unsupported configuration, type y and hit enter to continue anyway
  6. It will ask if you want to install the driver, type n to skip doing that (the necessary driver should already be installed).
  7. Answer the rest of the questions as you see fit (I usually create the softlink).
  8. Edit your .bash_profile using your favorite text editor. You need to add
    and make sure to add
    export LD_LIBRARY_PATH
    under the export statement for PATH. I find it is also useful to add another variable
    where your path should reflect where you installed the samples. If you do add this, make sure to add the corresponding export statment
    Save the changes and log out and back in so they take effect.
  9. Now, gcc 6.2.1 which is likely on your Fedora 24 installation, is not officially supported by CUDA 8.0, so if you try to compile any samples it will through an unsupported compiler error. We can stop that by editing the file
    Change line 117 to something like
    #if __GNUC__ > 8
    where the value was set to 5 originally.
  10. At this point things should be working, but there is one last snag. g++ 6.2.1 defaults to -std=c++14 and CUDA 8.0 seems to only support -std=c++98, so when you go to compile the samples with the provided make file, you'll get a bunch of errors. You can make things work, but I'm not sure how to change the main makefile. To verify that you can compile and run CUDA code navigate to the deviceQuery folder
    $ cd $HOME/NVIDIA_CUDA-8.0_Samples/1_Utilities/deviceQuery
    Open the make file there with your favorite text editor and change line 155 to CCFLAGS := -std=c++98
    Save the change, and run the make command in a terminal at that location to compile the deviceQuery code. Run the compiled code with
    $ primusrun ./deviceQuery
    you should get output telling you about ...

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2016-08-13 15:11:24 -0500

Seen: 2,897 times

Last updated: Nov 01 '16