'I cannot install ffmpeg-light on Windows 10
I'm trying to install ffmpeg-light with Stack, but pkg-config was not found. I'been searching for people with the same problem but none of the answers seemed to fix my problem. This is the output I get whenever I try to install. If someone could help, I would be really happy.
ffmpeg-light > configure
ffmpeg-light > Configuring ffmpeg-light-0.14.0...
ffmpeg-light > Cabal-simple_Z6RU0evB_3.2.1.0_ghc-8.10.7.exe: The program 'pkg-config' version
ffmpeg-light > >=0.9.0 is required but it could not be found.
ffmpeg-light >
Progress 28/29
-- While building package ffmpeg-light-0.14.0 (scroll up to its section to see the error) using:
C:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_3.2.1.0_ghc-8.10.7.exe
--builddir=.stack-work\dist\274b403a configure
--user
--package-db=clear
--package-db=global
--package-db=C:\sr\snapshots\47171dc1\pkgdb
--libdir=C:\sr\snapshots\47171dc1\lib
--bindir=C:\sr\snapshots\47171dc1\bin
--datadir=C:\sr\snapshots\47171dc1\share
--libexecdir=C:\sr\snapshots\47171dc1\libexec
--sysconfdir=C:\sr\snapshots\47171dc1\etc
--docdir=C:\sr\snapshots\47171dc1\doc\ffmpeg-light-0.14.0
--htmldir=C:\sr\snapshots\47171dc1\doc\ffmpeg-light-0.14.0
--haddockdir=C:\sr\snapshots\47171dc1\doc\ffmpeg-light-0.14.0
--dependency=JuicyPixels=JuicyPixels-3.3.6-GbCUJadIydOKYshnpdm9Pc
--dependency=base=base-4.14.3.0
--dependency=bytestring=bytestring-0.10.12.0
--dependency=either=either-5.0.1.1-FfDF8totHqzHXhibaxp0YK
--dependency=exceptions=exceptions-0.10.4
--dependency=mtl=mtl-2.2.2
--dependency=stm=stm-2.5.0.1
--dependency=transformers=transformers-0.5.6.2
--dependency=vector=vector-0.12.3.1-2QhxFayEJrmJ3PNYTgAmQ3
-f-buildaudioextractdemo
-f-buildaudiosindemo
-f-builddemo
-f-buildrasterdemo
-f-buildtranscodedemo
-f-buildvplaydemo
--extra-include-dirs=C:\Users\anaca\AppData\Local\Programs\stack\x86_64-windows\msys2-20210604\mingw64\include
--extra-lib-dirs=C:\Users\anaca\AppData\Local\Programs\stack\x86_64-windows\msys2-20210604\mingw64\lib
--extra-lib-dirs=C:\Users\anaca\AppData\Local\Programs\stack\x86_64-windows\msys2-20210604\mingw64\bin
--exact-configuration
--ghc-option=-fhide-source-paths
Process exited with code: ExitFailure 1
Solution 1:[1]
As @duplode pointed out in a comment, Stack expects pkg-config to be already installed on your system.
As you are running Windows, stack packages an MSYS2 environment. MSYS2 uses the pacman package manger.
You can access the MSYS2 environment by prepending stack exec -- to any command.
So running
stack exec -- pacman -S pkg-config
and then re-running Stack should solve your problem.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Ari Fordsham |
