gpt4 book ai didi

安装 pango 时 cabal 安装失败

转载 作者:行者123 更新时间:2023-12-04 23:06:30 26 4
gpt4 key购买 nike

Cabal 在尝试安装 pango 时失败,提示它找不到 pkg-config。

peauters:~ $ sudo cabal install pango -v
Password:
Reading available packages...
Choosing modular solver.
Resolving dependencies...
Extracting
/Users/chris/Library/Haskell/repo-cache/hackage.haskell.org/pango/0.12.3/pango-0.12.3.tar.gz
to /tmp/pango-0.12.3-76116...
creating /tmp/pango-0.12.3-76116/pango-0.12.3/dist/setup
creating /tmp/pango-0.12.3-76116/pango-0.12.3/dist
creating /tmp/pango-0.12.3-76116/pango-0.12.3/dist/setup
/usr/bin/ghc --make /tmp/pango-0.12.3-76116/pango-0.12.3/Setup.hs -o /tmp/pango-0.12.3-76116/pango-0.12.3/dist/setup/setup -odir /tmp/pango-0.12.3-76116/pango-0.12.3/dist/setup -hidir /tmp/pango-0.12.3-76116/pango-0.12.3/dist/setup -i -i/tmp/pango-0.12.3-76116/pango-0.12.3 -package Cabal-1.14.0
[1 of 2] Compiling SetupWrapper ( /tmp/pango-0.12.3-76116/pango-0.12.3/SetupWrapper.hs, /tmp/pango-0.12.3-76116/pango-0.12.3/dist/setup/SetupWrapper.o )
[2 of 2] Compiling Main ( /tmp/pango-0.12.3-76116/pango-0.12.3/Setup.hs, /tmp/pango-0.12.3-76116/pango-0.12.3/dist/setup/Main.o )
Linking /tmp/pango-0.12.3-76116/pango-0.12.3/dist/setup/setup ...
/tmp/pango-0.12.3-76116/pango-0.12.3/dist/setup/setup configure --verbose=2
--ghc --prefix=/Library/Haskell/$compiler/lib/$pkgid --libsubdir=
--datasubdir= --docdir=$prefix/doc --enable-library-profiling --global
--flags=new-exception --constraint=process ==1.1.0.1 --constraint=pretty
==1.1.1.0 --constraint=mtl ==2.1.1 --constraint=glib ==0.12.3.1
--constraint=directory ==1.1.0.2 --constraint=containers ==0.4.2.1
--constraint=cairo ==0.12.3.1 --constraint=base ==4.5.0.0 --constraint=array
==0.4.0.0 --disable-tests --disable-benchmarks
[1 of 2] Compiling Gtk2HsSetup ( Gtk2HsSetup.hs, dist/setup-wrapper/Gtk2HsSetup.o )
[2 of 2] Compiling Main ( SetupMain.hs, dist/setup-wrapper/Main.o )
Linking dist/setup-wrapper/setup ...
Configuring pango-0.12.3...
Flags chosen: new-exception=True
Dependency array ==0.4.0.0: using array-0.4.0.0
Dependency base ==4.5.0.0: using base-4.5.0.0
Dependency cairo ==0.12.3.1: using cairo-0.12.3.1
Dependency containers ==0.4.2.1: using containers-0.4.2.1
Dependency directory ==1.1.0.2: using directory-1.1.0.2
Dependency glib ==0.12.3.1: using glib-0.12.3.1
Dependency mtl ==2.1.1: using mtl-2.1.1
Dependency pretty ==1.1.1.0: using pretty-1.1.1.0
Dependency process ==1.1.0.1: using process-1.1.0.1
setup: The pkg-config package pango version <1.26.0 || >1.26.2 is required but
it could not be found.
World file is already up to date.
cabal: Error: some packages failed to install:
pango-0.12.3 failed during the configure step. The exception was:
ExitFailure 1

pkg-config 通过 Homebrew 安装:
peauters:~ $ which pkg-config
/usr/local/bin/pkg-config
peauters:~ $ pkg-config --version
0.25

关于这个问题的想法?

最佳答案

这个错误有点令人困惑。

这意味着您需要安装非 cabal 软件包“pango”。

我用 brew install pango 做到了这一点并解决了这个问题。

关于安装 pango 时 cabal 安装失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11022458/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com