Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 2903  / 2 Years ago, tue, october 18, 2022, 2:18:51

During my installation of torch on Ubuntu 17.04, I ran into a few problems.



The first report after trying to compile torch was something similar to
https://stackoverflow.com/questions/6622454/cuda-incompatible-with-my-gcc-version



giving me something like



error -- unsupported GNU version! gcc >5 are not supported!


After I fixed this I got another error similar to here:



https://stackoverflow.com/questions/11912878/gcc-error-gcc-error-trying-to-exec-cc1-execvp-no-such-file-or-directory



Gcc error: gcc: error trying to exec 'cc1': execvp: No such file or directory


Want to also add here that this is in conjunction with my cuda setup.


More From » compiling

 Answers
5

I fixed the first error by installing gcc-5:



sudo apt-get install gcc-5


next, it said it couldnt find cc1, so i did



which cc1


which returned a blank. This was because I didn't install g++-5



sudo apt-get install gcc-5 g++-5


we next want to make this our default gcc, so



sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 1


and finally



./install.sh


in the torch directory works. This is similar to the approach here:
https://gist.github.com/beci/2a2091f282042ed20cda



torch getting started that started it all: http://torch.ch/docs/getting-started.html



hope this helps someone


[#11043] Tuesday, October 18, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
strhen

Total Points: 27
Total Questions: 111
Total Answers: 103

Location: Angola
Member since Tue, Apr 25, 2023
1 Year ago
;