Attempt to enable arm32v7 emulator on Linux: Permission denied...!

Installing Toradex tools into Ubuntu VM on my MacBook.
Following instructions from this webpage:

Everything seems fine up thru addgroup (including verifying HelloWorld App).

Then, attempting to enable ARM emulation, per instructions:

parallels@ubuntu-linux-20-04-desktop:~$ docker run --rm -it arm32v7/debian arch
docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post “http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/create”: dial unix /var/run/docker.sock: connect: permission denied.
See ‘docker run --help’.
parallels@ubuntu-linux-20-04-desktop:~$

docker run --help. … did not seem very helpful.

Is there a way to get this to succeed?

Thanks!
Paul++

Greetings @Paul,

Typically this permission error occurs when trying to use Docker without the right permissions. There are two main ways around this:

  • Run every Docker command with sudo
  • Add your user to the docker user group.

Our article you linked has you do the second method. Though you mentioned you did do this addgroup command already.

Did you make sure to logout/login so that this change was applied by the system? If you run the groups command do you see the docker group in the output list?

Best Regards,
Jeremias

Jeremais,

Thanks, that was a helpful answer. Yes, I had added my username (as per website instructions).
Using sudo is what allowed the command to work…!

Now, I’m moving forward with installing Visual Studio

Many thanks!
Paul++

Glad I was able to assist.

Jeremias,

I installed VS and then installed the Toradex Extension … but hit a snag
Apparently I need to first install and run the Docker Deskptop in the Ubuntu VM

Yet, when I DL/Install as per instruction from Docker:

parallels@ubuntu-linux-20-04-desktop:~/Downloads$ sudo apt-get install ./docker-desktop-4.9.1-amd64.deb
Reading package lists… Done
Building dependency tree
Reading state information… Done
Note, selecting ‘docker-desktop:amd64’ instead of ‘./docker-desktop-4.9.1-amd64.deb’
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
docker-desktop:amd64 : Depends: docker-ce-cli:amd64 but it is not installable
Depends: libseccomp2:amd64 but it is not installable
Depends: libcap-ng0:amd64 but it is not installable
Depends: pass:amd64 but it is not installable
Depends: libgtk-3-0:amd64 but it is not installable
Depends: libx11-xcb1:amd64 but it is not installable
E: Unable to correct problems, you have held broken packages.

I think for this VM, I would need a Docker Desktop DEBIAN Pkg that is using arm64, yes?
I can only find amd64.

Do I need to be looking elsewhere for the right architecture package?

Thanks,
Paul++

When working with Linux or a Linux VM in your case, Docker Desktop is not required, just the Docker engine will suffice.

Furthermore judging by your command line it looks like you’re running an Ubuntu 20.04 VM correct?

According to the Docker Desktop installation page: Install on Ubuntu | Docker Documentation

Have a 64-bit version of either Ubuntu Jammy Jellyfish 22.04 (LTS) or Ubuntu Impish Indri 21.10. Docker Desktop is supported on x86_64 (or amd64) architecture.

Therefore I don’t think your version of Ubuntu is even compatible with Docker Desktop.

In any case just try installing the Docker Engine: Install Docker Engine on Ubuntu | Docker Documentation

For Linux the Docker engine is sufficient for Toradex use cases.

Best Regards,
Jeremias

Jeremais,

Thanks for the clarification.
I think I do have Docker Engine running….this looks successful:

Jeremais,

To be clear….I did do the steps to enable the Docker Engine for my username.
So, I can get the same result when running "docker run hello-world” without “sudo”

Yet, I still get the same error from VS when installing the Toradex Extension

Paul++

Jeremias,

I persisted a bit and I think I have succeeded in installing the Toradex extension
…needing some LogOut/LogBackIn help before it worked.

Thanks,
Paul++

Jeremias,

Apparently, I’m not yet done with the install.
Can you help me with this hurdle?

I installed the docker engine and the Toradex Extension to VSCode
When I launch VSCode, there is a pop-up that says:

The .NET Core SDK cannot be located. .NET Core debugging will not be enabled. Make sure the .NET Core SDK is installed and is on the path.

When I attempt to Debug, that kicks off a build. However: the build fails with a strange message (related to .NET
It seems):

Executing task: dotnet build /home/parallels/Documents/Avalonia/RupertIVD/RupertSimulator/Simulator.csproj /property:GenerateFullPaths=true /consoleloggerparameters:NoSummary <

/snap/dotnet-sdk/79/snap/command-chain/snapcraft-runner: 3: exec: /snap/dotnet-sdk/79/dotnet: not found
The terminal process “dotnet ‘build’, ‘/home/parallels/Documents/Avalonia/RupertIVD/RupertSimulator/Simulator.csproj’, ‘/property:GenerateFullPaths=true’, ‘/consoleloggerparameters:NoSummary’” failed to launch (exit code: 127).

That same error:

/snap/dotnet-sdk/79/snap/command-chain/snapcraft-runner: 3: exec: /snap/dotnet-sdk/79/dotnet: not found

Occurs when I attempt to invoke dotnet for a terminal window:

parallels@ubuntu-linux-20-04-desktop:~$ dotnet --version
/snap/dotnet-sdk/79/snap/command-chain/snapcraft-runner: 3: exec: /snap/dotnet-sdk/79/dotnet: not found

…so it looks like the dotnet runtime is missing (altho the .NET SDK seems to be installed)

When I try to install the .NET runtime, I also get an error:

parallels@ubuntu-linux-20-04-desktop:/snap/dotnet-sdk/79$ sudo snap install dotnet-runtime-60 --classic
error: snap “dotnet-runtime-60” is not available on stable for this architecture (arm64) but exists
on other architectures (amd64).

I’ve not been able to locate an installable dotnet runtime for arm64.
Does one exist? Where can I find it?

Thanks!
Paul++

For developing .NET apps with our extension you only need the .NET SDK installed as stated here: Visual Studio Code Extension for Torizon | Toradex Developer Center

As for downloads you can find all the .NET downloads here: Download .NET 6.0 (Linux, macOS, and Windows)

Best Regards,
Jeremias

Jeremias,

Okay…good to know. The Toradex Extension has, essentially, the .NET runtime that we will be using.
So, Why then does VSCode give this error:

Executing task: dotnet build /home/parallels/Documents/Avalonia/RupertIVD/RupertSimulator/Simulator.csproj /property:GenerateFullPaths=true /consoleloggerparameters:NoSummary <

/snap/dotnet-sdk/79/snap/command-chain/snapcraft-runner: 3: exec: /snap/dotnet-sdk/79/dotnet: not found

…when I attempt to launch a Debug session (which kicks off a build).
The Toradex Extension has been installed.
Is it complaining that there is no hardware on the backend?
Is it not possible to launch a build without the hardware being present?

Thanks,
Paul++

Just to clarify, you do have the .NET SDK installed on your development machine, correct?

In a terminal if you run dotnet --list-sdks what is the output?

I’m asking cause judging by your output here:

/snap/dotnet-sdk/79/snap/command-chain/snapcraft-runner: 3: exec: /snap/dotnet-sdk/79/dotnet: not found

It seems like the system is still complaining about not being able to find/execute the .NET SDK.

Is it complaining that there is no hardware on the backend?
Is it not possible to launch a build without the hardware being present?

If you are just building the application container then this can be done locally on your machine without hardware being present. If you are actually trying to debug, then this requires hardware to run the application so it can be remotely debugged.

Best Regards,
Jeremias

Jeremias,

When I do
dotnet --list-sdks
(Or any other dotnet command)
I always get the same error message:

/snap/dotnet-sdk/79/snap/command-chain/snapcraft-runner: 3: exec: /snap/dotnet-sdk/79/dotnet: not found

I agree that it seems that something went awry with the installation of the SDK.
I will re-attempt installing it, using the manual method. However, this will be my 8th try at re-installing it.
Because I have re-tried the installation so many times, I am looking for a way to install it that will yield a different result.

Paul++

How exactly are you attempting to install the SDK here? There should be multiple ways other than snap to install on Ubuntu.