nvcc error for cuda-9.0 : cannot execute binary file: Exec()

Hello to all!

I just installed the cuda-9.0 on ubuntu 16.04, but when i run nvcc --version i get this error:

bash: /usr/local/cuda-9.0/bin/nvcc: cannot execute binary file: Exec() format error

How can i fix this problem.

Thanks!

This usually happens when you install an executable that was compiled for a different architecture. On linux the 3 main architectures that might have a compiled nvcc would be ARM, x86, Power.

So my guess would be that you took an x86 installer and installed it on ARM or something like that.

Hello thank you for your response, Sorry I have to install cuda for the first time am a beginner in this

field.

When, i run “lscpu” I see that the architecture is : i686

What that’s means. Which version of cuda that I should install.

Thank you

When you run lscpu, you should be seeing x86_64, not i686

You appear to be on a 32-bit linux install. x86_64 = 64-bit (x86) linux. i686 = 32-bit (x86) linux

Your options are either to switch to a 64-bit linux install (if your machine supports that), or else use an old version of the CUDA toolkit that still had support (and an appropriate installer) for a 32-bit linux install. I don’t remember what version of CUDA dropped support for 32-bit linux. If you want to pursue that, you would need to do some poking around at [url]http://www.nvidia.com/getcuda[/url] use the “Legacy Releases” button

when i run lscpu

I see:

architecture i686

Processor (s) operating mode (s): 32-bit, 64-bit

That means there is no problem with the cuda 9.0? it must works?

what is the result of running:

uname -a

?

[url]kernel - What is the meaning of 'i686' in Ubuntu? - Ask Ubuntu

Linux user-Lenovo-ideapad-510-15IKB 4.4.0-31-generic #50-Ubuntu SMP Wed Jul 13 00:06:14 UTC 2016 i686 i686 i686 GNU/Linux

As per the link I posted in my previous comment, you are running a 32-bit linux install.

Your processor may support 64-bit execution (lscpu output) but your actual linux install appears to be 32-bit.

The lenovo ideapad 510 appears to be a relatively recent laptop. if that were my laptop, the first thing I would do would be to blow away the 32-bit linux install and replace it with a 64-bit linux install.

Thank you very much for your responses. So I must reinstall again ubuntu with a 64 bit version?

THanks!