gpt4 book ai didi

haskell - cabal 安装提示找不到可接受的 C 编译器

转载 作者:行者123 更新时间:2023-12-05 02:24:30 25 4
gpt4 key购买 nike

尝试安装时 snap来自 cabal,在 Windows 中,它提示无法找到 C 编译器。

这是输出:

> cabal update
> cabal install snap
Resolving dependencies...
In order, the following will be installed:
directory-1.2.0.0 (new version)
clientsession-0.8.0.1 (new package)
directory-tree-0.10.1 (new version)
process-1.1.0.2 (new version)
heist-0.8.1.1 (reinstall) changes: directory-1.1.0.2 -> 1.2.0.0,
directory-tree-0.11.0 -> 0.10.1, process-1.1.0.1 -> 1.1.0.2
unix-compat-0.4.0.0 (new package)
configurator-0.2.0.1 (new package)
snap-core-0.9.2.1 (new package)
snap-server-0.9.2.3 (new package)
snap-0.9.2.1 (new package)
Warning: Note that reinstalls are always dangerous. Continuing anyway...
Configuring directory-1.2.0.0...
configure: WARNING: unrecognized options: --with-compiler, --with-gcc
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/tmp/directory-1.2.0.0-4480/directory-1.2.0.0':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
cabal.exe: Error: some packages failed to install:
clientsession-0.8.0.1 depends on directory-1.2.0.0 which failed to install.
configurator-0.2.0.1 depends on directory-1.2.0.0 which failed to install.
directory-1.2.0.0 failed during the configure step. The exception was:
ExitFailure 1
directory-tree-0.10.1 depends on directory-1.2.0.0 which failed to install.
heist-0.8.1.1 depends on directory-1.2.0.0 which failed to install.
process-1.1.0.2 depends on directory-1.2.0.0 which failed to install.
snap-0.9.2.1 depends on directory-1.2.0.0 which failed to install.
snap-core-0.9.2.1 depends on directory-1.2.0.0 which failed to install.
snap-server-0.9.2.3 depends on directory-1.2.0.0 which failed to install.
unix-compat-0.4.0.0 depends on directory-1.2.0.0 which failed to install.

如果它是用 Haskell 编写的,为什么还需要 C 编译器?

最佳答案

它需要一个 C 编译器,因为目录包中有一些用 C 编写的位(通过 FFI 访问),正如您从 the c-sources section of the cabal file 中看到的那样.

关于haskell - cabal 安装提示找不到可接受的 C 编译器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12667060/

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