Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apt-get can't find dotnet packages, either by glob or regex (WSL2 ARM64 Ubuntu 18.04) #4954

Closed
carlossanlop opened this issue Jul 17, 2020 · 7 comments

Comments

@carlossanlop
Copy link
Member

carlossanlop commented Jul 17, 2020

I am trying to use Ubuntu 18.04 in WSL2 in an ARM64 Surface with Windows 10 v2004. Not sure if the problem is that the packages are unavailable in this architecture. Is that the root cause?

calope@calopearm:~$ uname -a
Linux calopearm 4.19.121-microsoft-standard #1 SMP Fri Jun 19 21:03:36 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux

I followed the official instructions first (deb package): https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu

And when those didn't work, I followed the instructions to manually install the gpg key: https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu#apt-troubleshooting

I'm getting this error:

calope@calopearm:~$ sudo apt-get install dotnet-runtime-3.1
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package dotnet-runtime-3.1
E: Couldn't find any package by glob 'dotnet-runtime-3.1'
E: Couldn't find any package by regex 'dotnet-runtime-3.1'

Tried with all combinations of dotnet* packages that apt-get can autocomplete: dotnet-runtime vs dotnet-sdk, versions 2.1, 3.0, 3.1, etc. They all throw the same error.

There are no other similar problems reported in dotnet/core, so I suspect this is an ARM64 specific issue.

My workarounds are:

  • To manually download from the website the tar.gz that I needed, then put it in a folder that I added to the path, or
  • To use dotnet-install.sh to do it for me: ./dotnet-install.sh -Version <versionNumber> -Architecture arm64 -InstallDir '<installDir>'

Let me know if you need more information or ping me on Teams if you'd like to see a live repro.

@carlossanlop
Copy link
Member Author

cc @dagood

@carlossanlop carlossanlop changed the title apt-get can't find dotnet packages, either by glob or regex apt-get can't find dotnet packages, either by glob or regex (ARM64 Ubuntu 18.04) Jul 17, 2020
@carlossanlop carlossanlop changed the title apt-get can't find dotnet packages, either by glob or regex (ARM64 Ubuntu 18.04) apt-get can't find dotnet packages, either by glob or regex (WSL2 ARM64 Ubuntu 18.04) Jul 17, 2020
@omajid
Copy link
Member

omajid commented Jul 17, 2020

This is a known issue, btw. Even the docs you linked to (https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu) make a note of this:

Package manager installs are only supported on the x64 architecture. Other architectures, such as ARM, must manually install the .NET Core SDK or .NET Core Runtime. For more information, see the manually install section below.

@dagood
Copy link
Member

dagood commented Jul 17, 2020

Yeah, this is expected. Adding arm64 packages to the Microsoft linux package repos is tracked by dotnet/runtime#3298. The tar.gz install method is what the docs recommend in the meantime.

Please file some feedback on the doc page if you can think of a way to make this clearer (maybe you navigated to this page in a particular way that didn't make x64-ness clear?)--this does get asked somewhat often. 😕

@dagood dagood closed this as completed Jul 17, 2020
@carlossanlop
Copy link
Member Author

Oops thanks @omajid, I missed that text.

@dagood I missed that sentence warning about ARM because I directly looked for the instructions to add the PPA to Ubuntu, and since it was possible to install the *.deb file, then find the packages in apt-get, I thought the packages were expected to be installed there too.

But maybe the dotnet packages should not be made available in the package manager in ARM at all.

@dagood
Copy link
Member

dagood commented Jul 17, 2020

Aha, I think we should add the x64-only warning in the troubleshooting section--you went there, and it's much more likely for people hitting this to go there than to go read the doc from the very top. Filed dotnet/docs#19564 for that.

since it was possible to install the *.deb file, then find the packages in apt-get

Where were they showing up? Was the search missing some filter for "applicable for my architecture"? Not totally familiar with the details of how apt works with arch but pretty sure they are listed per architecture, which would be the same reason the apt installs are failing to find applicable packages.

But maybe the dotnet packages should not be made available in the package manager in ARM at all.

They aren't, we don't publish anything for ARM, this is just a consequence of using a shared feed with I guess imperfect filtering on the client.

@carlossanlop
Copy link
Member Author

carlossanlop commented Jul 17, 2020

Where were they showing up?

@dagood after I added the PPA, I ran:

sudo apt-get install dotnet

Then pressed tab to autocomplete all the available matches, and lo and behold, you could see all the dotnet packages available for installation, but as described in the description, they can't be installed, you get the error.

Was the search missing some filter for "applicable for my architecture"?

You mean in apt-get? I think the user can assume the available packages are for their architecture, and if they want to install a package that is from another (compatible) architecture, they can add colon + architectureID after the package name. I think I've done it before, something like:

sudo apt-get install package:i386

Does that answer your question?

@dagood
Copy link
Member

dagood commented Jul 17, 2020

It does, thanks! I was assuming apt search dotnet or something similar. apt search dotnet does show me amd64 for each package, whereas some other packages like vim-common show all. I don't have easy access to a non-x64 machine to try this out and see if this is being filtered or simply showing what's available. It seems like tab autocomplete isn't doing the right thing here, but I don't have a good view into the internals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants