Closed tivanov-qb closed 1 year ago
Thanks for raising this @tivanov-qb. Wanted to link to the Discord chat too for more context.
Similar issues for me since upgrade to 2.0.0
I am having a similar issue related to this unresolved dependency constraint message.
I am trying to upgrade my packages but it fails with this message:
[NuGet] One or more unresolved package dependency constraints detected in the Chocolatey lib folder. All dependency constraints must be resolved to add or update packages. If these packages are being updated this message may be ignored, if not the following error(s) may be blocking the current package operation: 'obs-studio 27.2.3 constraint: obs-studio.install (>= 27.2.3)'
...
ERROR: Running ["C:\ProgramData\chocolatey\lib\obs-studio.install\tools\OBS-Studio-29.1.3-Full-Installer-x64_x64.exe" /S ] was not successful. Exit code was '6'. Exit code indicates the following: Setup process was forcefully terminated by the debugger..
It refuses to move past this until the dependency constraint is resolved. Here is where it gets messy.
Trying to upgrade obs-studio.install actually tells me that it's not even installed. Then it proceeds to try installing it like normal, but then fails with the same error above, for its own dependency constraint:
sudo choco upgrade -y obs-studio.install
Chocolatey v2.0.0
Upgrading the following packages:
obs-studio.install
By upgrading, you accept licenses for the packages.
Progress: Downloading obs-studio.install 29.1.3... 100%
obs-studio.install is not installed. Installing...
[NuGet] One or more unresolved package dependency constraints detected in the Chocolatey lib folder. All dependency constraints must be resolved to add or update packages. If these packages are being updated this message may be ignored, if not the following error(s) may be blocking the current package operation: 'obs-studio 27.2.3 constraint: obs-studio.install (>= 27.2.3)'
...
ERROR: Running ["C:\ProgramData\chocolatey\lib\obs-studio.install\tools\OBS-Studio-29.1.3-Full-Installer-x64_x64.exe" /S ] was not successful. Exit code was '6'. Exit code indicates the following: Setup process was forcefully terminated by the debugger..
So that's really odd and confusing. Looking at my installed packages, it's not listed (which makes sense given the above). But I do have just "obs-studio":
sudo choco list all
Chocolatey v2.0.0
7zip 22.1.0
7zip.install 22.1.0
aria2 1.36.0
bluescreenview.install 1.55.0
borderlessgaming 9.5.6
chocolatey 2.0.0
chocolatey-compatibility.extension 1.0.0
chocolatey-core.extension 1.4.0
chocolatey-misc-helpers.extension 0.0.4
discord 1.0.9003
discord.install 1.0.9004
dolphin-dev 5.0.19689-dev
ffmpeg 6.0.0
Firefox 95.0.2
golang 1.20.5
gsudo 2.0.10
krita 5.1.5
mediainfo 23.4.0
microsoft-windows-terminal 1.16.10261
obs-studio 27.2.3
pcsx2-dev 1.7.4592-dev
plexmediaserver 1.25.2.5319
powertoys 0.53.1
qbittorrent 4.5.3
sharex 14.1.0
sumatrapdf.install 3.4.6.20220629
t-clock 2.4.4.492
ums 10.13.0
vscode 1.67.2
vscode.install 1.67.2
yt-dlp 2023.3.4
So I thought what if I try to do sudo choco upgrade -y obs-studio
instead. However, this tells me I have the package pinned. This makes sense because I DO pin packages that have built in auto-updating, which OBS Studio does have. However, look at my pinned list:
sudo choco pin list
Chocolatey v2.0.0
discord|1.0.9003
discord.install|1.0.9004
Firefox|95.0.2
plexmediaserver|1.25.2.5319
powertoys|0.53.1
runelite|2.3.0
sharex|14.1.0
ums|10.13.0
vscode.install|1.67.2
For some reason, it doesn't show a pin for obs-studio. Yet when I proceeded with sudo choco pin remove -n "obs-studio"
, I get the following result:
Successfully removed a pin for obs-studio v27.2.3.
.
Sure enough after removing this pin, the packages then successfully upgrade.
Summary: For some reason, an "invisible" pin for obs-studio was causing a dependency constraint for the package obs-studio.install which I did not have installed.
Please let me know if this should be opened as a separate bug. I'm not sure if it should be or not?
@robmonte said... Please let me know if this should be opened as a separate bug. I'm not sure if it should be or not?
As part of the 2.1.0 release, https://docs.chocolatey.org/en-us/choco/release-notes#june-29-2023, there was a bug fixed around the removal of a pin for a package, and I am wondering if this could be related to the problem that you are seeing here. So no, I don't think we need another issue raised, not unless the issue comes up again.
I am glad to hear that you got a solution though!
@tivanov-qb @francoisaudic I just wanted to reach out again to check to see if you were still having issues?
The introduction of the dependency resolution checks is something that has concerned a lot of people since the release of Chocolatey CLI v2.0.0, but normally there is a path to get back to a valid state.
This is something that we are aiming to increase documentation around in the near future.
I have added a documentation issue here: https://github.com/chocolatey/docs/issues/773 so that we can track getting this added to our docs, with steps to proceed with getting a resolution to the problem.
I still have some issues, but I have found a way to get over it with --ignore-dependecies in CLI
@gep13 I also have same issues.. --ignore-dependencies may cause additional issues for non-working software, so i prefer not to use it.. trying to debug this now, i'm running into something else :< I'm using latest choco 2.1.0 now for testing..
2023-07-14 07:32:32,718 2468 [ERROR] - - dotnet-5.0-windowshosting - Unable to resolve dependency 'KB2919442': Unable to find a version o f 'KB2919442' that is compatible with 'KB2919355 1.0.20160915 constraint: KB2919442 (>= 1.0.20160915)'. 2023-07-14 07:32:32,718 2468 [DEBUG] - Sending message 'PostRunMessage' out if there are subscribers... 2023-07-14 07:32:32,718 2468 [DEBUG] - Exiting with 1 PS C:\Windows\system32> choco list KB2919355 Chocolatey v2.1.0 KB2919355 1.0.20160915 KB2999226 1.0.20181019 vcredist140 14.36.32532 vcredist2017 14.16.27033 4 packages installed. PS C:\Windows\system32> choco list KB2919442 Chocolatey v2.1.0 KB2919442 1.0.20160915 1 packages installed. PS C:\Windows\system32> PS C:\Windows\system32>
If I add --ignore-dependencies flag, I can install below packages
10:40:46 1689320439,,ui,message, amazon-ebs: C:\Users\vagrant>choco install dotnet-5.0-windowshosting -y --ignore-dependencies 10:40:46 1689320441,,ui,message, amazon-ebs: Chocolatey v2.1.0 10:40:46 1689320441,,ui,message, amazon-ebs: Installing the following packages: 10:40:46 1689320441,,ui,message, amazon-ebs: dotnet-5.0-windowshosting 10:40:46 1689320441,,ui,message, amazon-ebs: By installing%!(PACKER_COMMA) you accept licenses for the packages. 10:40:46 1689320445,,ui,message, amazon-ebs: Progress: Downloading dotnet-5.0-windowshosting 5.0.17... 100% 10:40:46 1689320445,,ui,message, amazon-ebs: 10:40:46 1689320445,,ui,message, amazon-ebs: dotnet-5.0-windowshosting v5.0.17 [Approved] 10:40:46 1689320445,,ui,message, amazon-ebs: dotnet-5.0-windowshosting package files install completed. Performing other installation steps. 10:40:46 1689320445,,ui,message, amazon-ebs: The install of dotnet-5.0-windowshosting was successful. 10:40:46 1689320445,,ui,message, amazon-ebs: Software installed to 'C:\ProgramData\chocolatey\lib\dotnet-5.0-windowshosting' 10:40:46 1689320445,,ui,message, amazon-ebs: 10:40:46 1689320445,,ui,message, amazon-ebs: Chocolatey installed 1/1 packages. 10:40:46 1689320445,,ui,message, amazon-ebs: See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log). 10:40:46 1689320445,,ui,message, amazon-ebs: 10:40:46 1689320445,,ui,message, amazon-ebs: C:\Users\vagrant>choco install dotnet-7.0-windowshosting -y --ignore-dependencies 10:40:46 1689320446,,ui,message, amazon-ebs: Chocolatey v2.1.0 10:40:46 1689320446,,ui,message, amazon-ebs: Installing the following packages: 10:40:46 1689320446,,ui,message, amazon-ebs: dotnet-7.0-windowshosting 10:40:46 1689320446,,ui,message, amazon-ebs: By installing%!(PACKER_COMMA) you accept licenses for the packages. 10:40:50 1689320449,,ui,message, amazon-ebs: Progress: Downloading dotnet-7.0-windowshosting 7.0.9... 100% 10:40:50 1689320449,,ui,message, amazon-ebs: 10:40:50 1689320449,,ui,message, amazon-ebs: dotnet-7.0-windowshosting v7.0.9 [Approved] 10:40:50 1689320449,,ui,message, amazon-ebs: dotnet-7.0-windowshosting package files install completed. Performing other installation steps. 10:40:50 1689320449,,ui,message, amazon-ebs: The install of dotnet-7.0-windowshosting was successful.
however.. dotnet-7.0-runtime and dotnet-7.0-aspnetruntime are failing due to dependency with dotnetcore-3.1-windowshosting
Unable to resolve dependency: Unable to find a version of 'chocolatey-core.extension' that is compatible with 'dotnet-7.0-runtime 7.0.9 constraint: chocolatey-core.extension (>= 1.3.5.1)'%!(PACKER_COMMA) 'dotnet-aspnetcoremodule-v2 13.1.22321 constraint: chocolatey-core.extension (>= 1.3.5.1)'%!(PACKER_COMMA) 'dotnetcore-3.1-aspnetruntime 3.1.32 constraint: chocolatey-core.extension (>= 1.1.0)'%!(PACKER_COMMA) 'dotnetcore-3.1-runtime 3.1.32 constraint: chocolatey-core.extension (>= 1.1.0)'%!(PACKER_COMMA) 'powershell-core 7.3.5 constraint: chocolatey-core.extension'.
Unable to resolve dependency: Unable to find a version of 'chocolatey-core.extension' that is compatible with 'dotnet-7.0-aspnetruntime 7.0.9 constraint: chocolatey-core.extension (>= 1.3.5.1)'%!(PACKER_COMMA) 'dotnet-aspnetcoremodule-v2 13.1.22321 constraint: chocolatey-core.extension (>= 1.3.5.1)'%!(PACKER_COMMA) 'dotnetcore-3.1-aspnetruntime 3.1.32 constraint: chocolatey-core.extension (>= 1.1.0)'%!(PACKER_COMMA) 'dotnetcore-3.1-runtime 3.1.32 constraint: chocolatey-core.extension (>= 1.1.0)'%!(PACKER_COMMA) 'powershell-core 7.3.5 constraint: chocolatey-core.extension'.
to conclude.. using version 1.3.1 of choco has no such issues :( how i can get a working installation with 2.1.0 ? right now it does not seem possible..
@gep13 main problem seems to be coming from dotnetcore-3.1-windowshosting package.. this package installs dotnet-aspnetcoremodule-v2 13.1.22321
dotnet-aspnetcoremodule-v2 13.1.22321 is not compatible with dotnet-5.0-windowshosting
uninstalling dotnetcore-3.1-windowshosting allows me to install dotnet-5.0-windowshosting and dotnet-aspnetcoremodule-v2 is bumped to 15.0.22105
then trying to install dotnet-7.0-windowshosting fails because of dotnet-aspnetcoremodule-v2 15.0.22105
uninstalling dotnet-5.0-windowshosting allows installation of dotnet-7.0-windowshosting with dotnet-aspnetcoremodule-v2 17.0.23172
so this is like a circular dependency, but worse :D
looks like we no longer have the possibility to support multiple dotnet-x.x-windowshosting versions ?
@tivanov-qb can you provide a complete set of reproducible steps to get a system into a state where you are no longer to install/upgrade packages due to dependency resolution warnings/errors.
If we can get that information, that may help us in providing insight on whether this is something that needs to be resolved at the package level, or whether this is something that needs to be corrected in Chocolatey CLI itself.
Thanks
@gep13
"choco install dotnetcore-3.1-windowshosting -y", "choco install dotnet-5.0-windowshosting -y", "choco install dotnet-7.0-windowshosting -y", "choco install dotnet-7.0-runtime --force -y", "choco install dotnet-7.0-aspnetruntime --force -y"
these are the commands I've found causing issues so far.. dotnetcore-3.1-windowshosting installs dotnet-aspnetcoremodule-v2 13.1.22321 trying to install dotnet-5.0-windowshosting after dotnet-3.1-windowshosting returns this error:
2023-07-14 07:32:32,718 2468 [ERROR] - - dotnet-5.0-windowshosting - Unable to resolve dependency 'KB2919442': Unable to find a version o f 'KB2919442' that is compatible with 'KB2919355 1.0.20160915 constraint: KB2919442 (>= 1.0.20160915)'. 2023-07-14 07:32:32,718 2468 [DEBUG] - Sending message 'PostRunMessage' out if there are subscribers... 2023-07-14 07:32:32,718 2468 [DEBUG] - Exiting with 1
installing dotnet-5.0-windowshosting: dotnet-5.0-windowshosting is installed with additional packages:
uninstalling dotnet-3.1-windowshosting allows me to install dotnet-5.0-windowshosting successfully.
then, i'm trying to install dotnet-7.0-windowshosting on top of dotnet-5.0-windowshosting:
PS C:\Windows\system32> choco install dotnet-7.0-windowshosting -y Chocolatey v2.1.0 Installing the following packages: dotnet-7.0-windowshosting By installing, you accept licenses for the packages. Unable to resolve dependency: Unable to find a version of 'chocolatey-core.extension' that is compatible with 'dotnet-7.0-aspnetruntime 7. 0.0 constraint: chocolatey-core.extension (>= 1.3.5.1)', 'dotnet-7.0-runtime 7.0.0 constraint: chocolatey-core.extension (>= 1.3.5.1)', 'd otnet-aspnetcoremodule-v2 15.0.22105 constraint: chocolatey-core.extension (>= 1.3.5.1)'.
Chocolatey installed 0/1 packages. 1 packages failed. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log). Failures dotnet-7.0-windowshosting - Unable to resolve dependency: Unable to find a version of 'chocolatey-core.extension' that is compatible with 'dotnet-7.0-aspnetruntime 7.0.0 constraint: chocolatey-core.extension (>= 1.3.5.1)', 'dotnet-7.0-runtime 7.0.0 constraint: chocolatey-core.extension (>= 1.3.5.1)', 'dotnet-aspnetcoremodule-v2 15.0.22105 constraint: chocolatey-core.extension (>= 1.3.5.1)'
dotnet-aspnetcoremodule-v2 15.0.22105 is installed with with dotnet-5.0-windowshosting causing dependency issues for dotnet-7.0-windowshosting
uninstalling dotnet-5.0-windowshosting allows me to install dotnet-7.0-windowshosting
I hope this helps
@tivanov-qb if I am reading the note from the package maintainer correctly, this is working as expected? Correct? Have you tried installing them directly using the non-meta packages?
Looks like you guys are onto something here. I am getting a ton of error messages like the following since the update:
You have chocolatey v2.0.0 installed. Version 2.1.0 is available based on your source(s). [NuGet] One or more unresolved package dependency constraints detected in the Chocolatey lib folder. All dependency constraints must be resolved to add or update packages. If these packages are being updated this message may be ignored, if not the following error(s) may be blocking the current package operation: 'ChocolateyGUI 2.0.0 constraint: Chocolatey (>= 2.0.0 && <= 2.999.999)', 'keepass-plugin-winhello 3.2.0 constraint: keepass (>= 2.33.0 && < 3.0.0)', 'mkvtoolnix 77.0.0 constraint: chocolatey (>= 0.10.5)' Unable to resolve dependency: Unable to find a version of 'chocolatey-dotnetfx.extension' that is compatible with 'dotnetfx 4.8.0.20190930 constraint: chocolatey-dotnetfx.extension (>= 1.0.1)'.
I dont seem to understand tivanov's solution. Do you understand what is happening here? Is there a workaround?
EDIT: To me, the problem seems to lie in the alphabetic order of updating via "choco upgrade all" -> if the dependent package is alphabetically later some might fail. Accordingly my problems have been solved with repeating calls of "choco upgrade all" as an easy, general solution. Thanks @corbob for the immediate help!
@carsten-engelke we actually just published a document on this type of error. You may want to take a look at it: https://docs.chocolatey.org/en-us/choco/troubleshooting/dependency-troubles. From that error, i think you may want to look at Example 2.
@gep13 yup, i think this works as expected now. We got the path to fix dependencies for dotnet. thanks for the help! happy to close this if you are good with it.
I'm going to go ahead and close this, but we can reopen it if necessary.
Hi, I think I'm still seeing this problem:
Last time I did gsudo choco upgrade -y dotCover --ignore-dependencies and hoped that this solves this, but it is back again on my next update, though KB2919442 is the desired version, so example 2 in the docs above doesn't help here. I have this problem for a couple of links (jetbrains-products like dotcover and also on vscode).
Do you see anything here (maybe it's another bug). choco-version 2.2.2
@corbob See the post above. A "choco upgrade -y --force resharper-platform" (the force was important) seemed to upgrade dotcover, dotmemory correctly and fix this issue (until the next upgrade). After that I could also upgrade vscode normally (without force). Does this make any sense to you, seems more a problem with package resharper-platform, doesn't it?
@Cyber1000 Please see the documentation page on this issue.
Checklist
What You Are Seeing?
Unable to resolve dependency: Unable to find a version of 'chocolatey-core.extension' that is compatible with 'dotnet-aspnetcoremodule-v2 13.1.22321 constraint: chocolatey-core.extension (>= 1.3.5.1)'. Unable to resolve dependency: Unable to find a version of 'chocolatey-core.extension' that is compatible with 'dotnet-7.0-aspnetruntime 7.0.8 constraint: chocolatey-core.extension (>= 1.3.5.1)'%!(PACKER_COMMA) 'dotnet-7.0-runtime 7.0.8 constraint: chocolatey-core.extension (>= 1.3.5.1)'%!(PACKER_COMMA) 'dotnet-aspnetcoremodule-v2 13.1.22321 constraint: chocolatey-core.extension (>= 1.3.5.1)'.
What is Expected?
Choco to work like it used to work with 1.4 version
How Did You Get This To Happen?
I install choco: Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
This results into version 2.
Then installing same packages that I used to install with 1.4 version causes dependency issues as mentioned above. choco upgrade chocolatey-core.extension Chocolatey v2.0.0 Upgrading the following packages: chocolatey-core.extension By upgrading, you accept licenses for the packages. chocolatey-core.extension v1.4.0 is the latest version available based on your source(s).
Chocolatey upgraded 0/1 packages. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log). the only possible workaround to get dotnet-5/7.0-windowshosting installed is: choco upgrade chocolatey --version 1.4.0 --allow-downgrade -y --force
System Details
Installed Packages
Output Log
Additional Context
No response