由于unix软件包配置错误,Cabal更新失败

时间:2017-11-19 16:07:59

标签: haskell cabal configure linuxmint cabal-install

我的发行版(Linux Mint)安装了一个很旧的Cabal(1.16.0)。今天,我尝试更新它并获得:

cabal install cabal-install -v3
...
unix-2.7.2.2 failed during the configure step. The exception was:
ExitFailure 1
zlib-0.6.1.2 failed during the building phase. The exception was:
ExitFailure 1

我也看到了

checking for suffix of executables... 
checking whether we are cross compiling... configure: error: in `/tmp/unix-2.7.2.2-2138/unix-2.7.2.2':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
sh returned ExitFailure 1

检查config.log后,我看到一些错误,但我不确定它们是否相关,配置是否失败:

Thread model: posix
gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) 
configure:2738: $? = 0
configure:2727: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:2738: $? = 4
configure:2727: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files
compilation terminated.
configure:2738: $? = 4
configure:2758: checking whether the C compiler works
configure:2780: gcc -Wl,--hash-size=31 -Wl,--reduce-memory-overheads   conftest.c  >&5
configure:2784: $? = 0
configure:2832: result: yes
configure:2835: checking for C compiler default output file name
configure:2837: result: a.out
configure:2843: checking for suffix of executables
configure:2850: gcc -o conftest -Wl,--hash-size=31 -Wl,--reduce-memory-overheads   conftest.c  >&5
configure:2854: $? = 0
configure:2876: result: 
configure:2898: checking whether we are cross compiling
configure:2906: gcc -o conftest -Wl,--hash-size=31 -Wl,--reduce-memory-overheads   conftest.c  >&5

这很奇怪(我试过运行gcc ..命令,它也很好)。欢迎任何有关此错误的帮助。

1 个答案:

答案 0 :(得分:0)

您也可以从cabal主页安装适用于Linux的cabal-install二进制文件:https://www.haskell.org/cabal/download.html