I am trying to install .NET 5 on Jetson Nano that runs Ubuntu 18.04.
I tried the script and I tried using snap and I tried following the manual steps.
Neither of these worked, I only get this error:
:dotnet
-bash: /usr/local/bin/dotnet: No such file or directory
There is a file there:
:~/dotnet$ ls -l /usr/local/bin/dotnet
lrwxrwxrwx 1 root root 18 Jun 28 13:44 /usr/local/bin/dotnet -> /opt/dotnet/dotnet
How do I troubleshoot this?
Mystery solved. As a part of an installer script, a 32-bit version of .NET 5 was downloaded and installed in /opt/dotnet folder. The symlink in /usr/local/bin was pointing to that 32-bit executable.
bash tells you the file doesn't exist, when it exists but it's 32-bit on 64-bit machine.
file
command shows the executable details:
:/opt/dotnet$ file dotnet
dotnet: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=1cfb4584e5126b53bc58927cf930f93058d1f637, stripped
And that's compared to the 64-bit:
:~/dotnet$ file dotnet
dotnet: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=a821d5cb39af704afbb0020e6ce6f88fc2ac0c97, stripped
To solve my issue, I overwrote the symlink to point to the 64-bit version
:/usr/local/bin$ sudo ln -s /home/username/dotnet/dotnet dotnet