尝试使用 Stack 安装 ThreadScope 时出现依赖性问题。这个问题似乎围绕着 cairo-0.13.8.1
Having dependency issues while trying to install ThreadScope with Stack. The issue seems to revolve around cairo-0.13.8.1
我正在尝试使用 stack install threadscope
安装 ThreadScope。
Stack 已向我推荐了要添加到我的全局 stack.yaml 文件中的包。我听从了它的所有建议。这是来自 ~/.stack/global-project/stack.yaml:
extra-deps:
- gtk2hs-buildtools-0.13.8.0
- cairo-0.13.8.1
- glib-0.13.8.1
- gtk-0.15.5
- pango-0.13.8.1
- gio-0.13.8.1
那我运行:
stack install threadscope
cairo > configure
cairo > [1 of 2] Compiling Main ( /tmp/stack-aa04726c2a449768/cairo-0.13.8.1/Setup.hs, /tmp/stack-aa04726c2a449768/cairo-0.13.8.1/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/setup/Main.o )
cairo > [2 of 2] Compiling StackSetupShim ( /home/nick/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, /tmp/stack-aa04726c2a449768/cairo-0.13.8.1/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/setup/StackSetupShim.o )
cairo > Linking /tmp/stack-aa04726c2a449768/cairo-0.13.8.1/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/setup/setup ...
cairo > Configuring cairo-0.13.8.1...
cairo > setup: The pkg-config package 'cairo' version ==1.2.0 || >1.2.0 is required
cairo > but it could not be found.
cairo >
-- While building package cairo-0.13.8.1 using:
/tmp/stack-aa04726c2a449768/cairo-0.13.8.1/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/setup/setup --builddir=.s
tack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0 configure --user --package-db=clear --package-db=global --package-db=/home/ni
ck/.stack/snapshots/x86_64-linux-tinfo6/2544cb5dce03ac8ef66db22fb64cd85312efb9806f5e1b516e14ea204c4e266b/8.8.3/pkgdb --libdir
=/home/nick/.stack/snapshots/x86_64-linux-tinfo6/2544cb5dce03ac8ef66db22fb64cd85312efb9806f5e1b516e14ea204c4e266b/8.8.3/lib -
-bindir=/home/nick/.stack/snapshots/x86_64-linux-tinfo6/2544cb5dce03ac8ef66db22fb64cd85312efb9806f5e1b516e14ea204c4e266b/8.8.3
/bin --datadir=/home/nick/.stack/snapshots/x86_64-linux-tinfo6/2544cb5dce03ac8ef66db22fb64cd85312efb9806f5e1b516e14ea204c4e26
6b/8.8.3/share --libexecdir=/home/nick/.stack/snapshots/x86_64-linux-tinfo6/2544cb5dce03ac8ef66db22fb64cd85312efb9806f5e1b516e
14ea204c4e266b/8.8.3/libexec --sysconfdir=/home/nick/.stack/snapshots/x86_64-linux-tinfo6/2544cb5dce03ac8ef66db22fb64cd85312e
fb9806f5e1b516e14ea204c4e266b/8.8.3/etc --docdir=/home/nick/.stack/snapshots/x86_64-linux-tinfo6/2544cb5dce03ac8ef66db22fb64c
d85312efb9806f5e1b516e14ea204c4e266b/8.8.3/doc/cairo-0.13.8.1 --htmldir=/home/nick/.stack/snapshots/x86_64-linux-tinfo6/2544c
b5dce03ac8ef66db22fb64cd85312efb9806f5e1b516e14ea204c4e266b/8.8.3/doc/cairo-0.13.8.1 --haddockdir=/home/nick/.stack/snapshots
/x86_64-linux-tinfo6/2544cb5dce03ac8ef66db22fb64cd85312efb9806f5e1b516e14ea204c4e266b/8.8.3/doc/cairo-0.13.8.1 --dependency=
Cabal=Cabal-3.0.1.0 --dependency=array=array-0.5.4.0 --dependency=base=base-4.13.0.0 --dependency=bytestring=bytestring-0.10.10
.0 --dependency=gtk2hs-buildtools=gtk2hs-buildtools-0.13.8.0-Bwvbdih7QpVGW3kWnJA1H3 --dependency=mtl=mtl-2.2.2 --dependency=te
xt=text-1.2.4.0 --dependency=utf8-string=utf8-string-1.0.1.1-IRxNMq5AVf036EceEkASq3 -fcairo_pdf -fcairo_ps -fcairo_svg --exact-configuration --ghc-option=-fhide-source-paths
Process exited with code: ExitFailure 1
Progress 1/4
好的,开罗似乎是问题所在。
stack install cairo
cairo> configure
cairo> [1 of 2] Compiling Main ( /tmp/stack-e9ffd2e58a879ecc/cairo-0.13.8.1/Setup.hs, /tmp/stack-e9ffd2e58a879ecc/cairo-0.13.8.1/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/setup/Main.o )
cairo> [2 of 2] Compiling StackSetupShim ( /home/nick/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, /tmp/stack-e9ffd2e58a879ecc/cairo-0.13.8.1/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/setup/StackSetupShim.o )
cairo> Linking /tmp/stack-e9ffd2e58a879ecc/cairo-0.13.8.1/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/setup/setup ...
cairo> Configuring cairo-0.13.8.1...
cairo> setup: The pkg-config package 'cairo' version ==1.2.0 || >1.2.0 is required
cairo> but it could not be found.
cairo>
-- While building package cairo-0.13.8.1 using:
/tmp/stack-e9ffd2e58a879ecc/cairo-0.13.8.1/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/setup/setup
--builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0 configure --user --package-db=clear --package-db=global
--package-db=/home/nick/.stack/snapshots/x86_64-linux-tinfo6/b9bd790e3091cf3e10cc5b6c0aa6789904463f24721de0b3576c4a5f79
a7d5d8/8.8.3/pkgdb --libdir=/home/nick/.stack/snapshots/x86_64-linux-tinfo6/b9bd790e3091cf3e10cc5b6c0aa6789904463f24
721de0b3576c4a5f79a7d5d8/8.8.3/lib --bindir=/home/nick/.stack/snapshots/x86_64-linux-tinfo6/b9bd790e3091cf3e10cc5b6c
0aa6789904463f24721de0b3576c4a5f79a7d5d8/8.8.3/bin --datadir=/home/nick/.stack/snapshots/x86_64-linux-tinfo6/b9bd790
e3091cf3e10cc5b6c0aa6789904463f24721de0b3576c4a5f79a7d5d8/8.8.3/share --libexecdir=/home/nick/.stack/snapshots/x86_64
-linux-tinfo6/b9bd790e3091cf3e10cc5b6c0aa6789904463f24721de0b3576c4a5f79a7d5d8/8.8.3/libexec --sysconfdir=/home/nick/
.stack/snapshots/x86_64-linux-tinfo6/b9bd790e3091cf3e10cc5b6c0aa6789904463f24721de0b3576c4a5f79a7d5d8/8.8.3/etc --doc
dir=/home/nick/.stack/snapshots/x86_64-linux-tinfo6/b9bd790e3091cf3e10cc5b6c0aa6789904463f24721de0b3576c4a5f79a7d5d8
/8.8.3/doc/cairo-0.13.8.1 --htmldir=/home/nick/.stack/snapshots/x86_64-linux-tinfo6/b9bd790e3091cf3e10cc5b6c0aa678990
4463f24721de0b3576c4a5f79a7d5d8/8.8.3/doc/cairo-0.13.8.1 --haddockdir=/home/nick/.stack/snapshots/x86_64-linux-tinfo6
/b9bd790e3091cf3e10cc5b6c0aa6789904463f24721de0b3576c4a5f79a7d5d8/8.8.3/doc/cairo-0.13.8.1 --dependency=Cabal=Cabal-3
.0.1.0 --dependency=array=array-0.5.4.0 --dependency=base=base-4.13.0.0 --dependency=bytestring=bytestring-0.10.10.0 -
-dependency=gtk2hs-buildtools=gtk2hs-buildtools-0.13.8.0-Bwvbdih7QpVGW3kWnJA1H3 --dependency=mtl=mtl-2.2.2 --depende
ncy=text=text-1.2.4.0 --dependency=utf8-string=utf8-string-1.0.1.1-IRxNMq5AVf036EceEkASq3 -fcairo_pdf -fcairo_ps
-fcairo_svg --exact-configuration --ghc-option=-fhide-source-paths
Process exited with code: ExitFailure 1
在这个错误中对我来说最突出的是行:setup: The pkg-config package 'cairo' version ==1.2.0 || >1.2.0 is required
。嗯,这是否意味着我应该首先尝试安装旧版本的 Cairo?我试过了,但没有任何运气。
我已经尝试 运行 命令:
stack upgrade --git --source-only
stack build cairo
我遇到了与 运行 stack install cairo
.
相同的错误
如果我运行which stack
我回来/home/nick/.local/bin/stack
最后,如果我尝试 stack install gtk2hs-buildtools
:
,会发生什么
Copying from /home/nick/.stack/snapshots/x86_64-linux-tinfo6/59804b23a4d63c47966b839bf0007deca79c979c9d5aa499d8828f7acbc09797/8.8.3/bin/gtk2hsC2hs to /home/nick/.local/bin/gtk2hsC2hs
Copying from /home/nick/.stack/snapshots/x86_64-linux-tinfo6/59804b23a4d63c47966b839bf0007deca79c979c9d5aa499d8828f7acbc09797/8.8.3/bin/gtk2hsHookGenerator to /home/nick/.local/bin/gtk2hsHookGenerator
Copying from /home/nick/.stack/snapshots/x86_64-linux-tinfo6/59804b23a4d63c47966b839bf0007deca79c979c9d5aa499d8828f7acbc09797/8.8.3/bin/gtk2hsTypeGen to /home/nick/.local/bin/gtk2hsTypeGen
Copied executables to /home/nick/.local/bin:
- gtk2hsC2hs
- gtk2hsHookGenerator
- gtk2hsTypeGen
Warning: The gtk2hsC2hs executable found on the PATH environment variable is /home/nick/.cabal/bin/gtk2hsC2hs and not the version that was just installed. This means that gtk2hsC2hs
calls on the command line will not use this version.
Warning: The gtk2hsHookGenerator executable found on the PATH environment variable is /home/nick/.cabal/bin/gtk2hsHookGenerator and not the version that was just installed. This means that
gtk2hsHookGenerator calls on the command line will not use this version.
Warning: The gtk2hsTypeGen executable found on the PATH environment variable is /home/nick/.cabal/bin/gtk2hsTypeGen and not the version that was just installed. This means that gtk2hsTypeGen
calls on the command line will not use this version.
pkg-config
正在寻找名为 cairo
的包,这可能会造成混淆,因为它与 Haskell cairo
包同名。这是构建日志的有用部分:
cairo> setup: The pkg-config package 'cairo' version ==1.2.0 || >1.2.0 is required
cairo> but it could not be found.
pkg-config
正在 PKG_CONFIG_PATH
中搜索名为 cairo.pc
的文件。在 Debian 上,这是由 libcairo2-dev
软件包提供的。
我正在尝试使用 stack install threadscope
安装 ThreadScope。
Stack 已向我推荐了要添加到我的全局 stack.yaml 文件中的包。我听从了它的所有建议。这是来自 ~/.stack/global-project/stack.yaml:
extra-deps:
- gtk2hs-buildtools-0.13.8.0
- cairo-0.13.8.1
- glib-0.13.8.1
- gtk-0.15.5
- pango-0.13.8.1
- gio-0.13.8.1
那我运行:
stack install threadscope
cairo > configure
cairo > [1 of 2] Compiling Main ( /tmp/stack-aa04726c2a449768/cairo-0.13.8.1/Setup.hs, /tmp/stack-aa04726c2a449768/cairo-0.13.8.1/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/setup/Main.o )
cairo > [2 of 2] Compiling StackSetupShim ( /home/nick/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, /tmp/stack-aa04726c2a449768/cairo-0.13.8.1/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/setup/StackSetupShim.o )
cairo > Linking /tmp/stack-aa04726c2a449768/cairo-0.13.8.1/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/setup/setup ...
cairo > Configuring cairo-0.13.8.1...
cairo > setup: The pkg-config package 'cairo' version ==1.2.0 || >1.2.0 is required
cairo > but it could not be found.
cairo >
-- While building package cairo-0.13.8.1 using:
/tmp/stack-aa04726c2a449768/cairo-0.13.8.1/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/setup/setup --builddir=.s
tack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0 configure --user --package-db=clear --package-db=global --package-db=/home/ni
ck/.stack/snapshots/x86_64-linux-tinfo6/2544cb5dce03ac8ef66db22fb64cd85312efb9806f5e1b516e14ea204c4e266b/8.8.3/pkgdb --libdir
=/home/nick/.stack/snapshots/x86_64-linux-tinfo6/2544cb5dce03ac8ef66db22fb64cd85312efb9806f5e1b516e14ea204c4e266b/8.8.3/lib -
-bindir=/home/nick/.stack/snapshots/x86_64-linux-tinfo6/2544cb5dce03ac8ef66db22fb64cd85312efb9806f5e1b516e14ea204c4e266b/8.8.3
/bin --datadir=/home/nick/.stack/snapshots/x86_64-linux-tinfo6/2544cb5dce03ac8ef66db22fb64cd85312efb9806f5e1b516e14ea204c4e26
6b/8.8.3/share --libexecdir=/home/nick/.stack/snapshots/x86_64-linux-tinfo6/2544cb5dce03ac8ef66db22fb64cd85312efb9806f5e1b516e
14ea204c4e266b/8.8.3/libexec --sysconfdir=/home/nick/.stack/snapshots/x86_64-linux-tinfo6/2544cb5dce03ac8ef66db22fb64cd85312e
fb9806f5e1b516e14ea204c4e266b/8.8.3/etc --docdir=/home/nick/.stack/snapshots/x86_64-linux-tinfo6/2544cb5dce03ac8ef66db22fb64c
d85312efb9806f5e1b516e14ea204c4e266b/8.8.3/doc/cairo-0.13.8.1 --htmldir=/home/nick/.stack/snapshots/x86_64-linux-tinfo6/2544c
b5dce03ac8ef66db22fb64cd85312efb9806f5e1b516e14ea204c4e266b/8.8.3/doc/cairo-0.13.8.1 --haddockdir=/home/nick/.stack/snapshots
/x86_64-linux-tinfo6/2544cb5dce03ac8ef66db22fb64cd85312efb9806f5e1b516e14ea204c4e266b/8.8.3/doc/cairo-0.13.8.1 --dependency=
Cabal=Cabal-3.0.1.0 --dependency=array=array-0.5.4.0 --dependency=base=base-4.13.0.0 --dependency=bytestring=bytestring-0.10.10
.0 --dependency=gtk2hs-buildtools=gtk2hs-buildtools-0.13.8.0-Bwvbdih7QpVGW3kWnJA1H3 --dependency=mtl=mtl-2.2.2 --dependency=te
xt=text-1.2.4.0 --dependency=utf8-string=utf8-string-1.0.1.1-IRxNMq5AVf036EceEkASq3 -fcairo_pdf -fcairo_ps -fcairo_svg --exact-configuration --ghc-option=-fhide-source-paths
Process exited with code: ExitFailure 1
Progress 1/4
好的,开罗似乎是问题所在。
stack install cairo
cairo> configure
cairo> [1 of 2] Compiling Main ( /tmp/stack-e9ffd2e58a879ecc/cairo-0.13.8.1/Setup.hs, /tmp/stack-e9ffd2e58a879ecc/cairo-0.13.8.1/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/setup/Main.o )
cairo> [2 of 2] Compiling StackSetupShim ( /home/nick/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, /tmp/stack-e9ffd2e58a879ecc/cairo-0.13.8.1/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/setup/StackSetupShim.o )
cairo> Linking /tmp/stack-e9ffd2e58a879ecc/cairo-0.13.8.1/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/setup/setup ...
cairo> Configuring cairo-0.13.8.1...
cairo> setup: The pkg-config package 'cairo' version ==1.2.0 || >1.2.0 is required
cairo> but it could not be found.
cairo>
-- While building package cairo-0.13.8.1 using:
/tmp/stack-e9ffd2e58a879ecc/cairo-0.13.8.1/.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0/setup/setup
--builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0 configure --user --package-db=clear --package-db=global
--package-db=/home/nick/.stack/snapshots/x86_64-linux-tinfo6/b9bd790e3091cf3e10cc5b6c0aa6789904463f24721de0b3576c4a5f79
a7d5d8/8.8.3/pkgdb --libdir=/home/nick/.stack/snapshots/x86_64-linux-tinfo6/b9bd790e3091cf3e10cc5b6c0aa6789904463f24
721de0b3576c4a5f79a7d5d8/8.8.3/lib --bindir=/home/nick/.stack/snapshots/x86_64-linux-tinfo6/b9bd790e3091cf3e10cc5b6c
0aa6789904463f24721de0b3576c4a5f79a7d5d8/8.8.3/bin --datadir=/home/nick/.stack/snapshots/x86_64-linux-tinfo6/b9bd790
e3091cf3e10cc5b6c0aa6789904463f24721de0b3576c4a5f79a7d5d8/8.8.3/share --libexecdir=/home/nick/.stack/snapshots/x86_64
-linux-tinfo6/b9bd790e3091cf3e10cc5b6c0aa6789904463f24721de0b3576c4a5f79a7d5d8/8.8.3/libexec --sysconfdir=/home/nick/
.stack/snapshots/x86_64-linux-tinfo6/b9bd790e3091cf3e10cc5b6c0aa6789904463f24721de0b3576c4a5f79a7d5d8/8.8.3/etc --doc
dir=/home/nick/.stack/snapshots/x86_64-linux-tinfo6/b9bd790e3091cf3e10cc5b6c0aa6789904463f24721de0b3576c4a5f79a7d5d8
/8.8.3/doc/cairo-0.13.8.1 --htmldir=/home/nick/.stack/snapshots/x86_64-linux-tinfo6/b9bd790e3091cf3e10cc5b6c0aa678990
4463f24721de0b3576c4a5f79a7d5d8/8.8.3/doc/cairo-0.13.8.1 --haddockdir=/home/nick/.stack/snapshots/x86_64-linux-tinfo6
/b9bd790e3091cf3e10cc5b6c0aa6789904463f24721de0b3576c4a5f79a7d5d8/8.8.3/doc/cairo-0.13.8.1 --dependency=Cabal=Cabal-3
.0.1.0 --dependency=array=array-0.5.4.0 --dependency=base=base-4.13.0.0 --dependency=bytestring=bytestring-0.10.10.0 -
-dependency=gtk2hs-buildtools=gtk2hs-buildtools-0.13.8.0-Bwvbdih7QpVGW3kWnJA1H3 --dependency=mtl=mtl-2.2.2 --depende
ncy=text=text-1.2.4.0 --dependency=utf8-string=utf8-string-1.0.1.1-IRxNMq5AVf036EceEkASq3 -fcairo_pdf -fcairo_ps
-fcairo_svg --exact-configuration --ghc-option=-fhide-source-paths
Process exited with code: ExitFailure 1
在这个错误中对我来说最突出的是行:setup: The pkg-config package 'cairo' version ==1.2.0 || >1.2.0 is required
。嗯,这是否意味着我应该首先尝试安装旧版本的 Cairo?我试过了,但没有任何运气。
我已经尝试 运行 命令:
stack upgrade --git --source-only
stack build cairo
我遇到了与 运行 stack install cairo
.
如果我运行which stack
我回来/home/nick/.local/bin/stack
最后,如果我尝试 stack install gtk2hs-buildtools
:
Copying from /home/nick/.stack/snapshots/x86_64-linux-tinfo6/59804b23a4d63c47966b839bf0007deca79c979c9d5aa499d8828f7acbc09797/8.8.3/bin/gtk2hsC2hs to /home/nick/.local/bin/gtk2hsC2hs
Copying from /home/nick/.stack/snapshots/x86_64-linux-tinfo6/59804b23a4d63c47966b839bf0007deca79c979c9d5aa499d8828f7acbc09797/8.8.3/bin/gtk2hsHookGenerator to /home/nick/.local/bin/gtk2hsHookGenerator
Copying from /home/nick/.stack/snapshots/x86_64-linux-tinfo6/59804b23a4d63c47966b839bf0007deca79c979c9d5aa499d8828f7acbc09797/8.8.3/bin/gtk2hsTypeGen to /home/nick/.local/bin/gtk2hsTypeGen
Copied executables to /home/nick/.local/bin:
- gtk2hsC2hs
- gtk2hsHookGenerator
- gtk2hsTypeGen
Warning: The gtk2hsC2hs executable found on the PATH environment variable is /home/nick/.cabal/bin/gtk2hsC2hs and not the version that was just installed. This means that gtk2hsC2hs
calls on the command line will not use this version.
Warning: The gtk2hsHookGenerator executable found on the PATH environment variable is /home/nick/.cabal/bin/gtk2hsHookGenerator and not the version that was just installed. This means that
gtk2hsHookGenerator calls on the command line will not use this version.
Warning: The gtk2hsTypeGen executable found on the PATH environment variable is /home/nick/.cabal/bin/gtk2hsTypeGen and not the version that was just installed. This means that gtk2hsTypeGen
calls on the command line will not use this version.
pkg-config
正在寻找名为 cairo
的包,这可能会造成混淆,因为它与 Haskell cairo
包同名。这是构建日志的有用部分:
cairo> setup: The pkg-config package 'cairo' version ==1.2.0 || >1.2.0 is required
cairo> but it could not be found.
pkg-config
正在 PKG_CONFIG_PATH
中搜索名为 cairo.pc
的文件。在 Debian 上,这是由 libcairo2-dev
软件包提供的。