microsoft / microsoft/winget-pkgs

[Package Issue]: Gyan.FFmpeg.Shared fails to set library paths in "--scope machine" mode

Open
#246,428 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Bug Needs-Triage
Dominant language
No language data
Stars
11.1k
Forks
9.7k
Avg merge
1h 32m
Merged PRs (30d)
376

Description

Please confirm these before moving forward
  • I have searched for my issue and not found a work-in-progress/duplicate/resolved issue.
  • I have not been informed if the issue is resolved in a preview version of the winget client.
Category of the issue

Installation issue.

Brief description of your issue

when installing in machine mode the installer does not set the path needed for the libraries of executables. therefore the app can not be run at all.
when installing in single user mode the paths are correctly set.

the problem comes from this packaged being a "shared" executable: it needs shared libraries, which are in the bin directory of the executable.

when installing in single user mode i noticed that winget put every single installation in the path:

%PATH%;C:\Users\loscrossos\AppData\Local\Microsoft\WinGet\Packages\Gyan.FFmpeg.Shared_Microsoft.Winget.Source_8wekyb3d8bbwe\ffmpeg-7.1.1-full_build-shared\bin;

but when installing in machine scope mode a symlink is put in the winget/links folder to the executable and the path only has this:

%PATH%;C:\Program Files\WinGet\Links

therefore the dlls can not be found.

this might be a bug on https://github.com/microsoft/winget-cli/pull/4816 where if the flag ArchiveBinariesDependOnPath is set to true (which is the case in this package) then the directory is added to path.

Steps to reproduce

start an admin terminal and use this:

winget install Gyan.FFmpeg.Shared -e  --silent --accept-package-agreements --accept-source-agreements --scope machine
rem run the program
ffmpeg

several popups appear saying that diverse dlls can not be found

Actual behavior

there are popups saying the libraries needed can not be found

Expected behavior

program should work

Environment
Windows Package Manager v1.10.340
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.26100.3476
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.25.339.0
Screenshots and Logs

Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with the documented machine-scope winget install command, then compare its PATH and DLL resolution with a single-user installation. Review the Gyan.FFmpeg.Shared package behavior and the referenced winget-cli pull request 4816; done means ffmpeg runs in machine scope without missing-library popups.

Written by the indexing model from the issue text.

Assessment

Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.