core
core copied to clipboard
unmet dependencies aspnetcore-targeting-pack-6.0
Description
Unable to install .Net 6 on Ubuntu 22.04.
sudo apt install dotnet-sdk-6.0
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
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:
aspnetcore-targeting-pack-6.0 : Depends: dotnet-targeting-pack-6.0 (>= 6.0.13) but 6.0.12-1 is to be installed
E: Unable to correct problems, you have held broken packages.
Following the guide from here:

Now I am not able to install the SDK at all. I need to use the 6.0.400 deps to fix an issue regarding SqlClient on Linux.
I just tried on a different computer (same OS) that had the jammy deps installed. Following the mixed state scenario 2 steps above gives me the same aspnetcore-targeting-pack-6.0 error above. Stuck, cannot install the SDK now and get on with work.
Seems easy enough to repo, install jammy packages (sudo apt install dotnet6), then follow the mixed state scenario 2 steps.
I believe if you sudo apt purge *dotnet* and sudo apt purge *aspnetcore*, sudo apt autoremove and then reinstall (sudo apt install dotnet-sdk-6.0) as per the instructions, this should wipe everything.
.NET SDK (reflecting any global.json):
Version: 6.0.404
Commit: be4f3ec411
Runtime Environment:
OS Name: linuxmint
OS Version: 21.1
OS Platform: Linux
RID: linux-x64
Base Path: /usr/share/dotnet/sdk/6.0.404/
global.json file:
Not found
Host:
Version: 6.0.13
Architecture: x64
Commit: 1af80ba017
.NET SDKs installed:
6.0.404 [/usr/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.12 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.12 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
cc @richlander @MichaelSimons
cc @NikolaMilosavljevic
I believe if you
sudo apt purge *dotnet*andsudo apt purge *aspnetcore*,sudo apt autoremoveand then reinstall (sudo apt install dotnet-sdk-6.0) as per the instructions, this should wipe everything..NET SDK (reflecting any global.json): Version: 6.0.404 Commit: be4f3ec411 Runtime Environment: OS Name: linuxmint OS Version: 21.1 OS Platform: Linux RID: linux-x64 Base Path: /usr/share/dotnet/sdk/6.0.404/ global.json file: Not found Host: Version: 6.0.13 Architecture: x64 Commit: 1af80ba017 .NET SDKs installed: 6.0.404 [/usr/share/dotnet/sdk] .NET runtimes installed: Microsoft.AspNetCore.App 6.0.12 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 6.0.12 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
@dylanvdmerwe was this successful output from the same machine? Can you confirm that by running the following 3 commands you were able to fix the issue?
sudo apt purge *dotnet*
sudo apt purge *aspnetcore*
sudo apt autoremove
We'll take a look at updating guidance at: https://github.com/dotnet/core/issues/7699
No answer in the last two weeks. Closing.