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

[Ubuntu 22.04] dotnet doesn't find installed SDKs #27082

Closed
Gounlaf opened this issue Aug 10, 2022 · 20 comments
Closed

[Ubuntu 22.04] dotnet doesn't find installed SDKs #27082

Gounlaf opened this issue Aug 10, 2022 · 20 comments
Labels
Area-Linux untriaged Request triage from a team member

Comments

@Gounlaf
Copy link

Gounlaf commented Aug 10, 2022

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

  1. add apt repo via packages-microsoft-prod.deb
$ wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
$ sudo dpkg -i packages-microsoft-prod.deb
$ rm packages-microsoft-prod.deb

I removed arm64 and armhf in /etc/apt/sources.list.d/microsoft-prod.list

  1. update info & install desired package (i use apt instead of apt-get)
$ sudo apt update
Get:9 https://packages.microsoft.com/ubuntu/22.04/prod jammy InRelease [10,5 kB]                                                                                                             
[...]
Get:25 https://packages.microsoft.com/ubuntu/22.04/prod jammy/main amd64 Packages [31,7 kB]                                
[...]
Get:27 https://packages.microsoft.com/ubuntu/22.04/prod jammy/main amd64 Contents (deb) [351 kB]                          
[...]
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
$ sudo apt install dotnet-sdk-6.0

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  aspnetcore-runtime-6.0 dotnet-apphost-pack-6.0 dotnet-host dotnet-hostfxr-6.0 dotnet-runtime-6.0 dotnet-targeting-pack-6.0 liblttng-ust-common1 liblttng-ust-ctl5 liblttng-ust1
  libunwind-13
The following NEW packages will be installed:
  aspnetcore-runtime-6.0 dotnet-apphost-pack-6.0 dotnet-host dotnet-hostfxr-6.0 dotnet-runtime-6.0 dotnet-sdk-6.0 dotnet-targeting-pack-6.0 liblttng-ust-common1 liblttng-ust-ctl5
  liblttng-ust1 libunwind-13
0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded.
Need to get 125 MB of archives.
After this operation, 475 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
Get:1 http://fr.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 dotnet-targeting-pack-6.0 amd64 6.0.108-0ubuntu1~22.04.1 [2 238 kB]
Get:2 https://packages.microsoft.com/ubuntu/22.04/prod jammy/main amd64 dotnet-sdk-6.0 amd64 6.0.400-1 [86,4 MB] 
Get:3 http://fr.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 dotnet-host amd64 6.0.108-0ubuntu1~22.04.1 [156 kB]
Get:4 http://fr.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 dotnet-hostfxr-6.0 amd64 6.0.108-0ubuntu1~22.04.1 [154 kB]
Get:5 http://fr.archive.ubuntu.com/ubuntu jammy/main amd64 libunwind-13 amd64 1:13.0.1-2ubuntu2 [20,8 kB]
Get:6 http://fr.archive.ubuntu.com/ubuntu jammy/main amd64 liblttng-ust-common1 amd64 2.13.1-1ubuntu1 [27,1 kB]
Get:7 http://fr.archive.ubuntu.com/ubuntu jammy/main amd64 liblttng-ust-ctl5 amd64 2.13.1-1ubuntu1 [77,9 kB]
Get:8 http://fr.archive.ubuntu.com/ubuntu jammy/main amd64 liblttng-ust1 amd64 2.13.1-1ubuntu1 [190 kB]
Get:9 http://fr.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 dotnet-runtime-6.0 amd64 6.0.108-0ubuntu1~22.04.1 [23,7 MB]
Get:10 http://fr.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 aspnetcore-runtime-6.0 amd64 6.0.108-0ubuntu1~22.04.1 [8 090 kB]
Get:11 http://fr.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 dotnet-apphost-pack-6.0 amd64 6.0.108-0ubuntu1~22.04.1 [3 735 kB]                                                    
Fetched 125 MB in 14s (8 918 kB/s)                                                                                                                                                           
Selecting previously unselected package dotnet-targeting-pack-6.0.
(Reading database ... 260872 files and directories currently installed.)
Preparing to unpack .../00-dotnet-targeting-pack-6.0_6.0.108-0ubuntu1~22.04.1_amd64.deb ...
Unpacking dotnet-targeting-pack-6.0 (6.0.108-0ubuntu1~22.04.1) ...
Selecting previously unselected package dotnet-host.
Preparing to unpack .../01-dotnet-host_6.0.108-0ubuntu1~22.04.1_amd64.deb ...
Unpacking dotnet-host (6.0.108-0ubuntu1~22.04.1) ...
Selecting previously unselected package dotnet-hostfxr-6.0.
Preparing to unpack .../02-dotnet-hostfxr-6.0_6.0.108-0ubuntu1~22.04.1_amd64.deb ...
Unpacking dotnet-hostfxr-6.0 (6.0.108-0ubuntu1~22.04.1) ...
Selecting previously unselected package libunwind-13:amd64.
Preparing to unpack .../03-libunwind-13_1%3a13.0.1-2ubuntu2_amd64.deb ...
Unpacking libunwind-13:amd64 (1:13.0.1-2ubuntu2) ...
Selecting previously unselected package liblttng-ust-common1:amd64.
Preparing to unpack .../04-liblttng-ust-common1_2.13.1-1ubuntu1_amd64.deb ...
Unpacking liblttng-ust-common1:amd64 (2.13.1-1ubuntu1) ...
Selecting previously unselected package liblttng-ust-ctl5:amd64.
Preparing to unpack .../05-liblttng-ust-ctl5_2.13.1-1ubuntu1_amd64.deb ...
Unpacking liblttng-ust-ctl5:amd64 (2.13.1-1ubuntu1) ...
Selecting previously unselected package liblttng-ust1:amd64.
Preparing to unpack .../06-liblttng-ust1_2.13.1-1ubuntu1_amd64.deb ...
Unpacking liblttng-ust1:amd64 (2.13.1-1ubuntu1) ...
Selecting previously unselected package dotnet-runtime-6.0.
Preparing to unpack .../07-dotnet-runtime-6.0_6.0.108-0ubuntu1~22.04.1_amd64.deb ...
Unpacking dotnet-runtime-6.0 (6.0.108-0ubuntu1~22.04.1) ...
Selecting previously unselected package aspnetcore-runtime-6.0.
Preparing to unpack .../08-aspnetcore-runtime-6.0_6.0.108-0ubuntu1~22.04.1_amd64.deb ...
Unpacking aspnetcore-runtime-6.0 (6.0.108-0ubuntu1~22.04.1) ...
Selecting previously unselected package dotnet-apphost-pack-6.0.
Preparing to unpack .../09-dotnet-apphost-pack-6.0_6.0.108-0ubuntu1~22.04.1_amd64.deb ...
Unpacking dotnet-apphost-pack-6.0 (6.0.108-0ubuntu1~22.04.1) ...
Selecting previously unselected package dotnet-sdk-6.0.
Preparing to unpack .../10-dotnet-sdk-6.0_6.0.400-1_amd64.deb ...
Unpacking dotnet-sdk-6.0 (6.0.400-1) ...
Setting up dotnet-host (6.0.108-0ubuntu1~22.04.1) ...
update-alternatives: using /usr/lib/dotnet/dotnet6-6.0.108/dotnet to provide /usr/bin/dotnet (dotnet) in auto mode
update-alternatives: warning: skip creation of /usr/share/bash-completion/completions/dotnet because associated file /usr/lib/dotnet/dotnet6-6.0.108/bash-completion/completions/dotnet (of li
nk group dotnet) doesn't exist
Setting up dotnet-apphost-pack-6.0 (6.0.108-0ubuntu1~22.04.1) ...
Setting up liblttng-ust-common1:amd64 (2.13.1-1ubuntu1) ...
Setting up dotnet-targeting-pack-6.0 (6.0.108-0ubuntu1~22.04.1) ...
Setting up libunwind-13:amd64 (1:13.0.1-2ubuntu2) ...
Setting up liblttng-ust-ctl5:amd64 (2.13.1-1ubuntu1) ...
Setting up dotnet-hostfxr-6.0 (6.0.108-0ubuntu1~22.04.1) ...
Setting up liblttng-ust1:amd64 (2.13.1-1ubuntu1) ...
Setting up dotnet-runtime-6.0 (6.0.108-0ubuntu1~22.04.1) ...
Setting up aspnetcore-runtime-6.0 (6.0.108-0ubuntu1~22.04.1) ...
Setting up dotnet-sdk-6.0 (6.0.400-1) ...
This software may collect information about you and your use of the software, and send that to Microsoft.
Please visit http://aka.ms/dotnet-cli-eula for more information.
Welcome to .NET!
---------------------
Learn more about .NET: https://aka.ms/dotnet-docs
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli-docs

Telemetry
---------
The .NET tools collect usage data in order to help us improve your experience. It is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_
CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.

Read more about .NET CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry

Configuring...
--------------
A command is running to populate your local package cache to improve restore speed and enable offline access. This command takes up to one minute to complete and only runs once.
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...

At this point, sdk && runtime should be installed

$ dotnet --info

global.json file:
  Not found

Host:
  Version:      6.0.8
  Architecture: x64
  Commit:       55fb7ef977

.NET SDKs installed:
  No SDKs were found.

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.8 [/usr/lib/dotnet/dotnet6-6.0.108/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.8 [/usr/lib/dotnet/dotnet6-6.0.108/shared/Microsoft.NETCore.App]

Download .NET:
  https://aka.ms/dotnet-download

Learn about .NET Runtimes and SDKs:
  https://aka.ms/dotnet/runtimes-sdk-info

dotnet found runtimes but not sdks.
Listing files in filesystem seems to show that sdk is installed

$ ls -lah /usr/lib/dotnet/
total 20K
drwxr-xr-x   3 root root 4,0K août  10 17:06 .
drwxr-xr-x 134 root root  12K août  10 17:06 ..
lrwxrwxrwx   1 root root   25 août  10 17:06 dotnet6 -> /etc/alternatives/dotnet6
drwxr-xr-x   6 root root 4,0K août  10 17:06 dotnet6-6.0.108

$ ls -lah /usr/share/dotnet/
total 28K
drwxr-xr-x   5 root root 4,0K août  10 17:06 .
drwxr-xr-x 338 root root  12K août  10 17:06 ..
drwxr-xr-x   3 root root 4,0K août  10 17:06 sdk
drwxr-xr-x   3 root root 4,0K août  10 17:06 sdk-manifests
drwxr-xr-x   3 root root 4,0K août  10 17:06 templates

$ ls -lah /usr/share/dotnet/sdk
total 32K
drwxr-xr-x  3 root root 4,0K août  10 17:06 .
drwxr-xr-x  5 root root 4,0K août  10 17:06 ..
drwxr-xr-x 30 root root  20K août  10 17:06 6.0.400

$ ls -lah /usr/share/dotnet/sdk-manifests/
total 12K
drwxr-xr-x  3 root root 4,0K août  10 17:06 .
drwxr-xr-x  5 root root 4,0K août  10 17:06 ..
drwxr-xr-x 10 root root 4,0K août  10 17:06 6.0.300

$ ls -lah /usr/share/dotnet/templates/
total 12K
drwxr-xr-x 3 root root 4,0K août  10 17:06 .
drwxr-xr-x 5 root root 4,0K août  10 17:06 ..
drwxr-xr-x 2 root root 4,0K août  10 17:06 6.0.8

Edit: more list/tests

$ 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

$ dpkg -l | grep dotnet
ii  dotnet-apphost-pack-6.0                    6.0.108-0ubuntu1~22.04.1                                                        amd64        Internal - targeting pack for Microsoft.NETCore.App 6.0
ii  dotnet-host                                6.0.108-0ubuntu1~22.04.1                                                        amd64        dotNET host command line
ii  dotnet-hostfxr-6.0                         6.0.108-0ubuntu1~22.04.1                                                        amd64        dotNET host resolver
ii  dotnet-runtime-6.0                         6.0.108-0ubuntu1~22.04.1                                                        amd64        dotNET runtime
ii  dotnet-sdk-6.0                             6.0.400-1                                                                       amd64        Microsoft .NET SDK 6.0.400
ii  dotnet-targeting-pack-6.0                  6.0.108-0ubuntu1~22.04.1                                                        amd64        Internal - targeting pack for Microsoft.NETCore.App 6.0
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Linux untriaged Request triage from a team member labels Aug 10, 2022
@baronfel
Copy link
Member

Can you check the path of the dotnet binary you are executing for these commands? it should be the one in /usr/share/dotnet/, but your output is making me thing you have another dotnet host binary in your PATH that's ahead of the one from the packages.

@Gounlaf
Copy link
Author

Gounlaf commented Aug 10, 2022

Can you check the path of the dotnet binary you are executing for these commands? it should be the one in /usr/share/dotnet/, but your output is making me thing you have another dotnet host binary in your PATH that's ahead of the one from the packages.

$ which dotnet
/usr/bin/dotnet

Found issue on another repository that is - i think - same as mine: dotnet/core#7661

@Gounlaf
Copy link
Author

Gounlaf commented Aug 10, 2022

$ 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?

@Gounlaf
Copy link
Author

Gounlaf commented Aug 10, 2022

@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

@Gounlaf
Copy link
Author

Gounlaf commented Aug 10, 2022

$ 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
But "binaries" directory (if I understand correctly) is still /usr/lib/dotnet/dotnet6-6.0.108/

@Unicron2k
Copy link

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
jammy-updates 6.0.108-0ubuntu1~22.04.1 were listed as the latest for all but dotnet-sdk-6.0 (which is 6.0.400-1, or 6.0.8).

Manually specifying the package-versions solved the issue for me:

$ sudo apt install aspnetcore-runtime-6.0=6.0.8-1 dotnet-apphost-pack-6.0=6.0.8-1 dotnet-host=6.0.8-1 dotnet-hostfxr-6.0=6.0.8-1 dotnet-runtime-6.0=6.0.8-1 dotnet-sdk-6.0=6.0.400-1 dotnet-targeting-pack-6.0=6.0.8-1

Looks like it's a version mismatch between the Ubuntu repos and Microsoft repos.

@lndr27
Copy link

lndr27 commented Aug 10, 2022

Manually specifying the package-versions solved the issue for me:

$ sudo apt install aspnetcore-runtime-6.0=6.0.8-1 dotnet-apphost-pack-6.0=6.0.8-1 dotnet-host=6.0.8-1 dotnet-hostfxr-6.0=6.0.8-1 dotnet-runtime-6.0=6.0.8-1 dotnet-sdk-6.0=6.0.400-1 dotnet-targeting-pack-6.0=6.0.8-1

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 ubuntu~22.04. was still being picked.

@richlander
Copy link
Member

Please see dotnet/core#7699 for guidance on how to resolve this situation.

@Gounlaf
Copy link
Author

Gounlaf commented Aug 11, 2022

@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

@ovebepari
Copy link

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 jammy-updates 6.0.108-0ubuntu1~22.04.1 were listed as the latest for all but dotnet-sdk-6.0 (which is 6.0.400-1, or 6.0.8).

Manually specifying the package-versions solved the issue for me:

$ sudo apt install aspnetcore-runtime-6.0=6.0.8-1 dotnet-apphost-pack-6.0=6.0.8-1 dotnet-host=6.0.8-1 dotnet-hostfxr-6.0=6.0.8-1 dotnet-runtime-6.0=6.0.8-1 dotnet-sdk-6.0=6.0.400-1 dotnet-targeting-pack-6.0=6.0.8-1

Looks like it's a version mismatch between the Ubuntu repos and Microsoft repos.

Thank you!

@shadovvs
Copy link

Read this: dotnet/core#7699

Jammy feed uses 6.0.1xx versioning, PMC uses 6.0.4xx versioning

I had dotnet installed from packages.microsoft.com before and after the update some packages used Jammy feed and some PMC which caused version missmatch.

I ended up using scenario 2: Use .NET 6 Package via PMC described in the github issue, updates work fine now.

dotnet-apphost-pack-6.0/jammy,now 6.0.9-1 amd64 [installed]
dotnet-host/jammy,now 7.0.0~rc.1.22426.10-1 amd64 [installed]
dotnet-hostfxr-6.0/jammy,now 6.0.9-1 amd64 [installed]
dotnet-runtime-6.0/jammy,now 6.0.9-1 amd64 [installed]
dotnet-runtime-deps-6.0/jammy,now 6.0.9-1 amd64 [installed,automatic]
dotnet-sdk-6.0/jammy,now 6.0.401-1 amd64 [installed]
dotnet-targeting-pack-6.0/jammy,now 6.0.9-1 amd64 [installed]

@danilobreda
Copy link

danilobreda commented Sep 19, 2022

@shadovvs how can i remove the Jammy ones and use only the PMC?

root@vm-build:~# dotnet --info
.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]
```

@Gounlaf
Copy link
Author

Gounlaf commented Sep 21, 2022

@danilobreda You could use pin priority (various example given), giving a higher priority to PMC

@adamlacerda
Copy link

Great! you saved my life! Thank you so much!

@dopme-io
Copy link

As a last resort, I did this: $ sudo rm -rf /usr/share/dotnet/* , everything went fine

@soyfrien
Copy link

soyfrien commented Oct 1, 2022

As a last resort, I did this: $ sudo rm -rf /usr/share/dotnet/* , everything went fine

Worked for:

$ dotnet --info
A fatal error occurred. The folder [/usr/share/dotnet/host/fxr] does not exist

Fortunately, since it was the last suggestion left.

@Macleykun
Copy link

After downgrading, i suggest to hold the packages for now:

sudo apt-mark hold aspnetcore-runtime-6.0=6.0.8-1 dotnet-apphost-pack-6.0=6.0.8-1 dotnet-host=6.0.8-1 dotnet-hostfxr-6.0=6.0.8-1 dotnet-runtime-6.0=6.0.8-1 dotnet-sdk-6.0=6.0.400-1 dotnet-targeting-pack-6.0=6.0.8-1 tzdata

To make sure they don't upgrade + check:

sudo apt autoremove -y && sudo apt autoclean -y && sudo apt update && sudo apt upgrade

@KubaSzostak
Copy link

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

@niiwade
Copy link

niiwade commented Sep 5, 2023

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

@iamgo100
Copy link

iamgo100 commented Nov 6, 2023

Тоже столкнулась с проблемой подобной. У меня она решилась после синхронизации версий. У меня почему-то устанавливались разные версии sdk и runtime. После того как вручную установила более старую версию sdk, все заработало!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Linux untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests