-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Ubuntu 22.04] dotnet doesn't find installed SDKs #27082
Comments
Can you check the path of the |
$ which dotnet
/usr/bin/dotnet Found issue on another repository that is - i think - same as mine: dotnet/core#7661 |
$ sudo apt info dotnet-hostfxr-6.0
Package: dotnet-hostfxr-6.0
Version: 6.0.108-0ubuntu1~22.04.1
Priority: optional
Section: universe/devel
Source: dotnet6
Origin: Ubuntu
Maintainer: Ubuntu Developers <[email protected]>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 493 kB
Depends: dotnet-host, libc6 (>= 2.34), libgcc-s1 (>= 3.0), libstdc++6 (>= 12)
Homepage: https://dot.net/core
Phased-Update-Percentage: 10
Download-Size: 154 kB
APT-Manual-Installed: no
APT-Sources: http://fr.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages
Description: dotNET host resolver
The dotNET host resolver contains the logic to resolve and select
the right version of the dotNet SDK or runtime to use.
.
dotNET is a fast, lightweight and modular platform for creating
cross platform applications that work on GNU/Linux, macOS and Windows.
.
It particularly focuses on creating console applications, web
applications and micro-services.
N: There are 7 additional records. Please use the '-a' switch to see them. Maybe this package is the problem? |
@baronfel I checked what you said: $ ls -lah /usr/bin/dotnet
lrwxrwxrwx 1 root root 24 août 10 17:35 /usr/bin/dotnet -> /etc/alternatives/dotnet
$ ls -lah /etc/alternatives/dotnet
lrwxrwxrwx 1 root root 38 août 10 17:35 /etc/alternatives/dotnet -> /usr/lib/dotnet/dotnet6-6.0.108/dotnet |
$ sudo apt list --all-versions dotnet-sdk-6.0
Listing... Done
dotnet-sdk-6.0/jammy 6.0.400-1 amd64
dotnet-sdk-6.0/jammy 6.0.303-1 amd64
dotnet-sdk-6.0/jammy 6.0.302-1 amd64
dotnet-sdk-6.0/jammy 6.0.301-1 amd64
dotnet-sdk-6.0/jammy 6.0.300-1 amd64
dotnet-sdk-6.0/jammy 6.0.203-1 amd64
dotnet-sdk-6.0/jammy 6.0.202-1 amd64
dotnet-sdk-6.0/jammy 6.0.201-1 amd64
dotnet-sdk-6.0/jammy 6.0.200-1 amd64
dotnet-sdk-6.0/jammy 6.0.108-1 amd64
dotnet-sdk-6.0/jammy-updates 6.0.108-0ubuntu1~22.04.1 amd64
dotnet-sdk-6.0/jammy 6.0.107-1 amd64
dotnet-sdk-6.0/jammy 6.0.106-1 amd64
dotnet-sdk-6.0/jammy 6.0.105-1 amd64
dotnet-sdk-6.0/jammy 6.0.104-1 amd64
dotnet-sdk-6.0/jammy 6.0.103-1 amd64
dotnet-sdk-6.0/jammy 6.0.102-1 amd64 So I tried 6.0.303-1, 302,... up to 6.0.107-1 $ sudo apt install dotnet-sdk-6.0=6.0.107-1 SDK directory (in /usr/share/dotnet) changes |
Just encountered the same problem on Kubuntu 22.04. Not sure if this applies to you, but when listing the versions for the dependencies I noticed Manually specifying the package-versions solved the issue for me:
Looks like it's a version mismatch between the Ubuntu repos and Microsoft repos. |
Thank you, it worked. I thought I was doing something wrong, I even tried on a clean VM to be sure. I was having the same issue and only specifying the version for all the dependencies actually works, even downgrading to 6.0.303 the runtime |
Please see dotnet/core#7699 for guidance on how to resolve this situation. |
@richlander thanks for the update! it works perfectly fine now 🎉 .NET SDK (reflecting any global.json):
Version: 6.0.400
Commit: 7771abd614
Runtime Environment:
OS Name: ubuntu
OS Version: 22.04
OS Platform: Linux
RID: ubuntu.22.04-x64
Base Path: /usr/share/dotnet/sdk/6.0.400/
global.json file:
Not found
Host:
Version: 6.0.8
Architecture: x64
Commit: 55fb7ef977
.NET SDKs installed:
6.0.400 [/usr/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.8 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.8 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Download .NET:
https://aka.ms/dotnet-download
Learn about .NET Runtimes and SDKs:
https://aka.ms/dotnet/runtimes-sdk-info |
Thank you! |
Read this: dotnet/core#7699 Jammy feed uses I had dotnet installed from I ended up using
|
@shadovvs how can i remove the Jammy ones and use only the PMC?
|
@danilobreda You could use pin priority (various example given), giving a higher priority to PMC |
Great! you saved my life! Thank you so much! |
As a last resort, I did this: $ sudo rm -rf /usr/share/dotnet/* , everything went fine |
Worked for:
Fortunately, since it was the last suggestion left. |
After downgrading, i suggest to hold the packages for now:
To make sure they don't upgrade + check:
|
For me solution provided by Microsoft resolved the issue (Ubuntu 18.04.6 LTS): sudo apt remove 'dotnet*' 'aspnet*' 'netstandard*'
sudo rm /etc/apt/sources.list.d/microsoft-prod.list
sudo apt update
sudo apt install dotnet-sdk-6.0 |
Worked for me |
Тоже столкнулась с проблемой подобной. У меня она решилась после синхронизации версий. У меня почему-то устанавливались разные версии sdk и runtime. После того как вручную установила более старую версию sdk, все заработало! |
Describe the bug
I've followed instructions to install dotnet sdk via the package manager and the microsoft packages repository.
dotnet
find runtime but not sdk.however it seems that sdk is installed.
I tried previous version (up to 6.0.107-1), it doesn't work.
To Reproduce
I just copy/paste some instructions from official documentation
I removed
arm64
andarmhf
in/etc/apt/sources.list.d/microsoft-prod.list
At this point, sdk && runtime should be installed
dotnet
found runtimes but not sdks.Listing files in filesystem seems to show that sdk is installed
Edit: more list/tests
The text was updated successfully, but these errors were encountered: