Core: Problem trying to install dotnet on armv7l using snap

Created on 20 Oct 2020  Â·  5Comments  Â·  Source: dotnet/core

Problem encountered on https://dotnet.microsoft.com/learn/dotnet/hello-world-tutorial/install
Operating System: linux

20201020T165254Z: mrbtc@i420nod:~/Apps/DotNET$ sudo snap install dotnet-sdk --classic
[sudo] password for mrbtc: 
sudo: snap: command not found
20201020T165303Z: mrbtc@i420nod:~/Apps/DotNET$ sudo apt update
Hit:1 https://download.docker.com/linux/ubuntu focal InRelease
Hit:2 https://packages.microsoft.com/ubuntu/20.04/prod focal InRelease                            
Hit:3 http://ports.ubuntu.com/ubuntu-ports focal InRelease                                        
Hit:4 http://ppa.launchpad.net/lightningnetwork/ppa/ubuntu focal InRelease
Get:5 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease [111 kB]
Get:6 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease [98.3 kB]
Get:7 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease [107 kB]
Get:8 http://ports.ubuntu.com/ubuntu-ports focal-updates/main Sources [313 kB]
Get:9 http://ports.ubuntu.com/ubuntu-ports focal-updates/main Translation-en [155 kB]
Fetched 785 kB in 3s (235 kB/s)                              
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.
20201020T165320Z: mrbtc@i420nod:~/Apps/DotNET$ sudo apt install snapd
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  apparmor libfuse2 liblzo2-2 squashfs-tools
Suggested packages:
  apparmor-profiles-extra apparmor-utils fuse zenity | kdialog
The following NEW packages will be installed:
  apparmor libfuse2 liblzo2-2 snapd squashfs-tools
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 20.5 MB of archives.
After this operation, 83.3 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
Get:1 http://ports.ubuntu.com/ubuntu-ports focal-updates/main armhf apparmor armhf 2.13.3-7ubuntu5.1 [426 kB]
Get:2 http://ports.ubuntu.com/ubuntu-ports focal/main armhf libfuse2 armhf 2.9.9-3 [71.9 kB]
Get:3 http://ports.ubuntu.com/ubuntu-ports focal/main armhf liblzo2-2 armhf 2.10-2 [44.4 kB]
Get:4 http://ports.ubuntu.com/ubuntu-ports focal/main armhf squashfs-tools armhf 1:4.4-1 [113 kB]
Get:5 http://ports.ubuntu.com/ubuntu-ports focal-updates/main armhf snapd armhf 2.46.1+20.04 [19.9 MB]
Fetched 20.5 MB in 3s (7,249 kB/s)
Preconfiguring packages ...
Selecting previously unselected package apparmor.
(Reading database ... 57089 files and directories currently installed.)
Preparing to unpack .../apparmor_2.13.3-7ubuntu5.1_armhf.deb ...
Unpacking apparmor (2.13.3-7ubuntu5.1) ...
Selecting previously unselected package libfuse2:armhf.
Preparing to unpack .../libfuse2_2.9.9-3_armhf.deb ...
Unpacking libfuse2:armhf (2.9.9-3) ...
Selecting previously unselected package liblzo2-2:armhf.
Preparing to unpack .../liblzo2-2_2.10-2_armhf.deb ...
Unpacking liblzo2-2:armhf (2.10-2) ...
Selecting previously unselected package squashfs-tools.
Preparing to unpack .../squashfs-tools_1%3a4.4-1_armhf.deb ...
Unpacking squashfs-tools (1:4.4-1) ...
Selecting previously unselected package snapd.
Preparing to unpack .../snapd_2.46.1+20.04_armhf.deb ...
Unpacking snapd (2.46.1+20.04) ...
Setting up liblzo2-2:armhf (2.10-2) ...
Setting up libfuse2:armhf (2.9.9-3) ...
Setting up apparmor (2.13.3-7ubuntu5.1) ...
Created symlink /etc/systemd/system/sysinit.target.wants/apparmor.service → /lib/systemd/system/apparmor.service.
Setting up squashfs-tools (1:4.4-1) ...
Setting up snapd (2.46.1+20.04) ...
Created symlink /etc/systemd/system/multi-user.target.wants/snapd.apparmor.service → /lib/systemd/system/snapd.apparmor.service.
Created symlink /etc/systemd/system/multi-user.target.wants/snapd.autoimport.service → /lib/systemd/system/snapd.autoimport.service.
Created symlink /etc/systemd/system/multi-user.target.wants/snapd.core-fixup.service → /lib/systemd/system/snapd.core-fixup.service.
Created symlink /etc/systemd/system/multi-user.target.wants/snapd.recovery-chooser-trigger.service → /lib/systemd/system/snapd.recovery-chooser-trigger.service.
Created symlink /etc/systemd/system/multi-user.target.wants/snapd.seeded.service → /lib/systemd/system/snapd.seeded.service.
Created symlink /etc/systemd/system/cloud-final.service.wants/snapd.seeded.service → /lib/systemd/system/snapd.seeded.service.
Created symlink /etc/systemd/system/multi-user.target.wants/snapd.service → /lib/systemd/system/snapd.service.
Created symlink /etc/systemd/system/timers.target.wants/snapd.snap-repair.timer → /lib/systemd/system/snapd.snap-repair.timer.
Created symlink /etc/systemd/system/sockets.target.wants/snapd.socket → /lib/systemd/system/snapd.socket.
Created symlink /etc/systemd/system/final.target.wants/snapd.system-shutdown.service → /lib/systemd/system/snapd.system-shutdown.service.
snapd.failure.service is a disabled or a static unit, not starting it.
snapd.snap-repair.service is a disabled or a static unit, not starting it.
Processing triggers for libc-bin (2.31-0ubuntu9.1) ...
Processing triggers for systemd (245.4-4ubuntu3.2) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for dbus (1.12.16-2ubuntu2.1) ...
Processing triggers for mime-support (3.64ubuntu1) ...
20201020T165421Z: mrbtc@i420nod:~/Apps/DotNET$ dotnet
-bash: dotnet: command not found
20201020T165452Z: mrbtc@i420nod:~/Apps/DotNET$ sudo snap install dotnet-sdk --classic
error: snap "dotnet-sdk" is not available on stable but is available to install on the following
       channels:

       edge       snap install --edge dotnet-sdk

       Please be mindful pre-release channels may include features not completely tested or
       implemented. Get more information with 'snap info dotnet-sdk'.
20201020T165501Z: mrbtc@i420nod:~/Apps/DotNET$ sudo snap install --edge dotnet-sdk --classic
2020-10-20T16:56:06Z INFO Waiting for automatic snapd restart...
dotnet-sdk (edge) 5.0.100-preview.3.20216.6 from Microsoft .NET Core (dotnetcore✓) installed
20201020T165642Z: mrbtc@i420ndotnet
/snap/dotnet-sdk/81/snap/command-chain/snapcraft-runner: 3: exec: /snap/dotnet-sdk/81/dotnet: not found
20201020T165647Z: mrbtc@i420nod:~/Apps/DotNET$ dotnet
/snap/dotnet-sdk/81/snap/command-chain/snapcraft-runner: 3: exec: /snap/dotnet-sdk/81/dotnet: not found
20201020T165651Z: mrbtc@i420nod:~/Apps/DotNET$ 

20201020T165651Z: mrbtc@i420nod:~/Apps/DotNET$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.1 LTS
Release:    20.04
Codename:   focal
20201020T165846Z: mrbtc@i420nod:~/Apps/DotNET$ uname -a
Linux i420nod 4.14.111-139 #1 SMP PREEMPT Tue Apr 16 17:31:00 UTC 2019 armv7l armv7l armv7l GNU/Linux
20201020T165849Z: mrbtc@i420nod:~/Apps/DotNET$ 

I'm giving up. I'm tired. Any suggestions here would be appreciated.

Most helpful comment

@GlenCooper it seems that you are installing armv7l which is not supported as a Snap. I'll work with @rbhanda to clarify why it's showing as supported on Snap site.

You can try installing on armv7l using the options listed here: https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu#manual-install

All 5 comments

@dagood @leecow can you help?

@GlenCooper which instructions were you following? It looks like you didn't end up entering this command for the dotnet alias:

sudo snap alias dotnet-sdk.dotnet dotnet

From e.g. https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu#snap

However this error suggests that for some reason dotnet is pointing to something, just something wrong:

20201020T165647Z: mrbtc@i420nod:~/Apps/DotNET$ dotnet
/snap/dotnet-sdk/81/snap/command-chain/snapcraft-runner: 3: exec: /snap/dotnet-sdk/81/dotnet: not found

One non-obvious reason for "not found" is that the file could exist, but be built for a different arch.

I'm not familiar with Snaps (don't have a machine with snapd set up), but I've seen this before when the dotnet-sdk snap package itself was built incorrectly. (https://github.com/dotnet/runtime/issues/40739, has the steps I took to figure this out.) It may also be that your snapd install is behaving incorrectly and grabbing something that doesn't work on your machine, but I don't see anything particularly pointing that way in the logs.

Or, maybe the file really doesn't exist and something environmental went wrong.

I can't look into this further right now to try to narrow it down--@leecow and @rbhanda may be able to help more directly.

/cc @dleeapho

From the instructions in release notes please try to install .NET Core using snap by running:

sudo snap install dotnet-sdk --channel 3.1/stable --classic
and
sudo snap alias dotnet-sdk.dotnet dotnet

@GlenCooper it seems that you are installing armv7l which is not supported as a Snap. I'll work with @rbhanda to clarify why it's showing as supported on Snap site.

You can try installing on armv7l using the options listed here: https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu#manual-install

Thank you everyone, especially @NikolaMilosavljevic. I can confirm that the box I was trying to set this up on was a 32bit ARM (specifically: ODROID HC2 : Home Cloud Two, by 3DMakerWorld, Inc., https://www.amazon.com/dp/B0794DG2WF/ref=cm_sw_em_r_mt_dp_BbuLFbPV3X0TX?_encoding=UTF8&psc=1).

I downloaded the ARM32 binary manually and no longer have the errors:

20201025T091455Z: mrbtc@i420nod:~$ which dotnet
dotnet is /snap/bin/dotnet
20201025T091502Z: mrbtc@i420nod:~$ dotnet
/snap/dotnet-sdk/81/snap/command-chain/snapcraft-runner: 3: exec: /snap/dotnet-sdk/81/dotnet: not found
20201025T091504Z: mrbtc@i420nod:~$ sudo snap alias dotnet-sdk.dotnet dotnet
[sudo] password for mrbtc: 
20201025T091513Z: mrbtc@i420nod:~$ dotnet
/snap/dotnet-sdk/81/snap/command-chain/snapcraft-runner: 3: exec: /snap/dotnet-sdk/81/dotnet: not found
20201025T091528Z: mrbtc@i420nod:~$ cd Apps/DotNET/
20201025T091604Z: mrbtc@i420nod:~/Apps/DotNET$ ls -la
total 116
drwxr-xr-x 4 mrbtc mrbtc  4096 Oct 25 08:52 .
drwxrwxr-x 7 mrbtc mrbtc  4096 Oct 23 09:13 ..
-rwxr-xr-x 1 mrbtc mrbtc 64044 Sep 23 11:36 dotnet
drwxr-xr-x 3 mrbtc mrbtc  4096 Sep 23 11:39 host
-rw-r--r-- 1 mrbtc mrbtc  1116 Sep 23 11:33 LICENSE.txt
drwxr-xr-x 4 mrbtc mrbtc  4096 Sep 23 11:39 shared
-rw-r--r-- 1 mrbtc mrbtc 31330 Sep 23 11:33 ThirdPartyNotices.txt
20201025T091605Z: mrbtc@i420nod:~/Apps/DotNET$ ./dotnet 

Usage: dotnet [options]
Usage: dotnet [path-to-application]

Options:
  -h|--help         Display help.
  --info            Display .NET Core information.
  --list-sdks       Display the installed SDKs.
  --list-runtimes   Display the installed runtimes.

path-to-application:
  The path to an application .dll file to execute.
20201025T091611Z: mrbtc@i420nod:~/Apps/DotNET$
Was this page helpful?
0 / 5 - 0 ratings