DNEG xStudio Windows构建:Chocolatey依赖包安装失败求助
问题
在Windows系统上安装DNEG的xStudio视频审阅工具,执行官方构建指南第4步时,使用Chocolatey安装powershell-core、git、cmake三个包均失败,报错信息如下:
C:\Users\admin>choco install powershell-core -y Chocolatey v2.2.2 Installing the following packages: powershell-core By installing, you accept licenses for the packages. [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: 'python 3.12.1 constraint: python3 (= 3.12.1)' Unable to resolve dependency: Unable to find a version of 'chocolatey-windowsupdate.extension' that is compatible with 'KB2999226 1.0.20181019 constraint: chocolatey-windowsupdate.extension (>= 1.0.2)', 'KB3033929 1.0.5 constraint: chocolatey-windowsupdate.extension (>= 1.0.4)', 'KB3035131 1.0.3 constraint: chocolatey-windowsupdate.extension (>= 1.0.4)'. Chocolatey installed 0/1 packages. 1 packages failed. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log). Failures - powershell-core - Unable to resolve dependency: Unable to find a version of 'chocolatey-windowsupdate.extension' that is compatible with 'KB2999226 1.0.20181019 constraint: chocolatey-windowsupdate.extension (>= 1.0.2)', 'KB3033929 1.0.5 constraint: chocolatey-windowsupdate.extension (>= 1.0.4)', 'KB3035131 1.0.3 constraint: chocolatey-windowsupdate.extension (>= 1.0.4)'. C:\Users\admin>choco install git -y Chocolatey v2.2.2 Installing the following packages: git By installing, you accept licenses for the packages. [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: 'python 3.12.1 constraint: python3 (= 3.12.1)' Unable to resolve dependency: Unable to find a version of 'chocolatey-core.extension' that is compatible with 'git.install 2.43.0 constraint: chocolatey-core.extension (>= 1.3.3)', 'vcredist140 14.38.33130 constraint: chocolatey-core.extension (>= 1.3.3)'. Chocolatey installed 0/1 packages. 1 packages failed. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log). Failures - git - Unable to resolve dependency: Unable to find a version of 'chocolatey-core.extension' that is compatible with 'git.install 2.43.0 constraint: chocolatey-core.extension (>= 1.3.3)', 'vcredist140 14.38.33130 constraint: chocolatey-core.extension (>= 1.3.3)'. C:\Users\admin>choco install cmake -y Chocolatey v2.2.2 Installing the following packages: cmake By installing, you accept licenses for the packages. [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: 'python 3.12.1 constraint: python3 (= 3.12.1)' Unable to resolve dependency 'chocolatey': Unable to find a version of 'chocolatey' that is compatible with 'cmake.install 3.27.9 constraint: chocolatey (>= 0.10.5)'. Chocolatey installed 0/1 packages. 1 packages failed. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log). Failures - cmake - Unable to resolve dependency 'chocolatey': Unable to find a version of 'chocolatey' that is compatible with 'cmake.install 3.27.9 constraint: chocolatey (>= 0.10.5)'.
推测问题与Python依赖冲突有关,已在管理员Shell中执行操作,寻求解决这三个包的安装问题。
解决步骤
核心问题是Chocolatey本地依赖库存在版本冲突,优先处理Python约束问题,再修复Chocolatey扩展和依赖:
清理Python相关的Chocolatey约束
打开管理员PowerShell,执行以下命令移除Python的强制版本约束及残留文件:choco uninstall python -y --remove-dependencies choco uninstall python3 -y --remove-dependencies choco cache clean -y Remove-Item -Path "C:\ProgramData\chocolatey\lib\python*" -Recurse -Force -ErrorAction SilentlyContinue更新Chocolatey及核心扩展
先确保Chocolatey本身为最新版本,再强制安装/更新所需扩展:choco upgrade chocolatey -y choco install chocolatey-core.extension chocolatey-windowsupdate.extension -y --force重新安装目标包
可一次性安装三个包,若单个包报错,尝试指定兼容版本安装:# 一次性安装 choco install powershell-core git cmake -y --force # 若git报错,指定兼容版本示例 choco install git --version=2.42.0 -y # 若cmake报错,指定兼容版本示例 choco install cmake --version=3.27.8 -y验证安装结果
执行以下命令确认包是否安装成功:pwsh --version git --version cmake --version
内容的提问来源于stack exchange,提问作者Film Tailor Mainframe
相关产品推荐
相关产品推荐

