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

dotnet-host-7.0 : Conflicts: dotnet-host #17811

Closed
mcgiany opened this issue Nov 15, 2023 · 10 comments
Closed

dotnet-host-7.0 : Conflicts: dotnet-host #17811

mcgiany opened this issue Nov 15, 2023 · 10 comments

Comments

@mcgiany
Copy link

mcgiany commented Nov 15, 2023

Hi,
i try to install dotnet-sdk 8.0 on my Ubuntu 22.04 machine.
I already have sdk-7.0 installed.
I follow instruction on this site: https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu-2004
But when i run sudo apt-get install dotnet-sdk-8.0 i end up in error:

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:
 dotnet-host-7.0 : Conflicts: dotnet-host
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

Is there something i'm doing wrong?

@jachin84
Copy link

Same issue, Ubuntu 22.04 in WSL.

@sivertheisholt
Copy link

sivertheisholt commented Nov 16, 2023

Same issue here, Ubuntu 22.04 in WSL2. I had some problems when installing .NET 8 preview earlier this year, with .NET 7 installed. I had to remove .NET 7 to install .NET 8 preview. Not sure if that is supposed to be the case with preview versions.

@dhabierre
Copy link

dhabierre commented Nov 16, 2023

Same behavior here under Ubuntu 23.04.

The aspnetcore-runtime-7.0 is already installed on my VPS.

declare repo_version=$(if command -v lsb_release &> /dev/null; then lsb_release -r -s; else grep -oP '(?<=^VERSION_ID=).+' /etc/os-release | tr -d '"'; fi)

wget https://packages.microsoft.com/config/ubuntu/$repo_version/packages-microsoft-prod.deb -O packages-microsoft-prod.deb

sudo dpkg -i packages-microsoft-prod.deb

sudo apt-get update &&  sudo apt-get install -y aspnetcore-runtime-8.0

Output

Hit:1 http://security.ubuntu.com/ubuntu lunar-security InRelease
Hit:2 http://nova.clouds.archive.ubuntu.com/ubuntu lunar InRelease
Hit:3 http://nova.clouds.archive.ubuntu.com/ubuntu lunar-updates InRelease
Hit:4 https://packages.microsoft.com/ubuntu/23.04/prod lunar InRelease
Hit:5 http://nova.clouds.archive.ubuntu.com/ubuntu lunar-backports InRelease
Reading package lists... Done
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:
 dotnet-host-7.0 : Conflicts: dotnet-host
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

Note: if I don't use the deb package, aspnetcore-runtime-8.0 is not found.

@dhabierre
Copy link

The aspnetcore-runtime-8.0 is now available

$ apt list | grep aspnet

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

aspnetcore-runtime-6.0/lunar-updates,lunar-security 6.0.125-0ubuntu1~23.04.1 amd64
aspnetcore-runtime-7.0/lunar-updates,lunar-security,now 7.0.114-0ubuntu1~23.04.1 amd64 [installed]
aspnetcore-runtime-8.0/lunar 8.0.0-1 amd64

@baronfel
Copy link
Member

Are you all installing 8.0 from the packages.microsoft.com feeds, or from the distro feeds? If from PMC, have you followed the steps in the doc for removing any .NET packages from the distro feeds and de-prioritizing the distro feeds for future installs of .NET packages? I tend to see these kinds of errors when folks have mixed package feeds set up, that's why I ask.

@mcgiany
Copy link
Author

mcgiany commented Nov 16, 2023

Ok, it might be the issue. I checked my current packages and some of them are probably from distro feeds.

dotnet-apphost-pack-7.0/jammy-updates,jammy-security,now 7.0.114-0ubuntu1~22.04.1 amd64 [installed,automatic]
dotnet-apphost-pack-8.0/focal,now 8.0.0-1 amd64 [installed,auto-removable]
dotnet-host-7.0/jammy-updates,jammy-security,now 7.0.114-0ubuntu1~22.04.1 amd64 [installed,automatic]
dotnet-hostfxr-7.0/jammy-updates,jammy-security,now 7.0.114-0ubuntu1~22.04.1 amd64 [installed,automatic]
dotnet-runtime-7.0/jammy-updates,jammy-security,now 7.0.114-0ubuntu1~22.04.1 amd64 [installed,automatic]
dotnet-runtime-deps-8.0/focal,now 8.0.0-1 amd64 [installed,auto-removable]
dotnet-sdk-7.0/focal,now 7.0.404-1 amd64 [installed]
dotnet-targeting-pack-7.0/jammy-updates,jammy-security,now 7.0.114-0ubuntu1~22.04.1 amd64 [installed,automatic]
dotnet-targeting-pack-8.0/focal,now 8.0.0-1 amd64 [installed,auto-removable]

Where i can find the docs about removing .NET packages from distro feeds?

@baronfel
Copy link
Member

The full docs are here - but pay special attention to the section on cleaning up an existing mixed installation.

@mcgiany
Copy link
Author

mcgiany commented Nov 16, 2023

@baronfel you saved me. Very helpful doc, i dont know why i didnt found it before. Now it works. Thank you so much. Issue can be closed.

@mcgiany mcgiany closed this as completed Nov 20, 2023
@alibildir
Copy link

@WhiteSymmetry
Copy link

WhiteSymmetry commented Jan 12, 2024

sudo apt remove dotnet-sdk* dotnet-host* dotnet* aspnetcore* netstandard*
sudo apt remove aspnetcore*
sudo apt remove netstandard*
sudo apt remove dotnet-host*
sudo apt purge dotnet-sdk* dotnet-host* dotnet* aspnetcore* netstandard*
sudo rm -f /etc/apt/sources.list.d/mssql-release.list
sudo rm /etc/apt/sources.list.d/microsoft-prod.list
sudo rm /etc/apt/sources.list.d/microsoft-prod.list.save
sudo apt update
Install by App Center: .Net Core SDK, Stable 8.0.101
there is no need for other installations!
(sudo snap install dotnet-sdk #Installed by App Center
sudo apt install dotnet-sdk-8.0 #Installed by App Center
sudo apt install dotnet-host-8.0 #Installed by .Net Core SDK)
dotnet workload update
source ~/.bashrc
dotnet sdk check
.NET SDKs:
Version Status

8.0.100 Patch 8.0.101 is available.

dotnet --info
.NET SDK:
Version: 8.0.100

Workload version: 8.0.100-manifests.6c33ef20
OS Platform: Linux
RID: linux-x64
Base Path: /snap/dotnet-sdk/233/sdk/8.0.100/

Host:
Version: 8.0.0
Architecture: x64

dotnet --list-sdks
8.0.100 [/snap/dotnet-sdk/233/sdk]
dotnet --version
8.0.100

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

7 participants