This is a companion discussion topic for the original entry at https://linuxconfig.org/how-to-install-nvidia-cuda-toolkit-on-fedora-29-linux
Thank you very much for the commands you provided.
Using $ sudo dnf --releasever=27 install gcc-7.3.1-6.fc27
is indeed really dangerous. A way around is to install a seperate compiler and give a link to that compiler.
To hack gcc compiler problem use negativo’s repo.
sudo dnf config-manager --add-repo=https://negativo17.org/repos/fedora-nvidia.repo
Install compilers
sudo dnf install cuda-gcc.x86_64 cuda-gcc-c++.x86_64
Change gcc and g++ binary paths for cuda:
sudo ln -s /usr/bin/cuda-gcc /usr/local/cuda/bin/gcc
sudo ln -s /usr/bin/cuda-g++ /usr/local/cuda/bin/g++
before running a build command provide CC and CXX flags. for example:
CC=cuda-gcc CXX=cuda-g++ python setup.py build develop
That worked for me I hope it works for someone else also.
mahiratmis
Ok, but not works cuda-gcc Torch7 install (github nagadomi/distro)
CC=cuda-gcc CXX=cuda-g++ ./install.sh
…
/usr/libexec/gcc/x86_64-redhat-linux/8.3.0/cc1: error while loading shared libraries: libmpfr.so.4: cannot open shared object file: No such file or directory
gmake[1]: *** [CMakeFiles/cmTC_286af.dir/build.make:83: CMakeFiles/cmTC_286af.dir/testCCompiler.c.o] Error 1
gmake[1]: Leaving directory ‘/home/dankahazi/torch/build/CMakeFiles/CMakeTmp’
gmake: *** [Makefile:138: cmTC_286af/fast] Error 2
Hi Idanka,
Welcome to our forums.
This error message suggests you are missing that libmpfr.so.4 object file, which is in the mpfr
package. Have you tried to install it?
Hi!
thx, but omg i not add negativo17 - org repo
i use rpmfusion - org
i will try the other package