由于http-client,pandoc无法安装 [英] pandoc can't install due to http-client

查看:56
本文介绍了由于http-client,pandoc无法安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 Ubuntu 12.04.5 上安装 pandoc 1.13.1,但由于依赖于 http 客户端而失败:

I'm trying to install pandoc 1.13.1 on Ubuntu 12.04.5, but its failing due to a dependency on http-client:

$ cabal install pandoc  --verbose
Reading available packages...
Choosing modular solver.
Resolving dependencies...
Extracting
/home/paleozogt/.cabal/packages/hackage.haskell.org/pandoc/1.13.1/pandoc-1.13.1.tar.gz
to /tmp/pandoc-1.13.1-14926...
creating /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist/setup
creating /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist
creating /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist/setup
/usr/bin/ghc --make /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/Setup.hs -o /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist/setup/setup -odir /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist/setup -hidir /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist/setup -i -i/tmp/pandoc-1.13.1-14926/pandoc-1.13.1 -package Cabal-1.14.0
[1 of 1] Compiling Main             ( /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/Setup.hs, /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist/setup/Main.o )
Linking /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist/setup/setup ...
/tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist/setup/setup configure --verbose=2
--ghc --prefix=/home/paleozogt/.cabal --user --flags=-trypandoc
--flags=network-uri --flags=-make-pandoc-man-pages --flags=https
--flags=-embed_data_files --constraint=zlib ==0.5.4.1 --constraint=zip-archive
==0.2.3.4 --constraint=yaml ==0.8.9.3 --constraint=xml ==1.3.13
--constraint=vector ==0.10.12.1 --constraint=unordered-containers ==0.2.5.1
--constraint=time ==1.4 --constraint=text ==1.1.1.3 --constraint=texmath ==0.8
--constraint=temporary ==1.2.0.3 --constraint=tagsoup ==0.13.3
--constraint=syb ==0.4.2 --constraint=scientific ==0.3.3.1 --constraint=random
==1.0.1.1 --constraint=process ==1.1.0.1 --constraint=parsec ==3.1.7
--constraint=pandoc-types ==1.12.4.1 --constraint=old-time ==1.1.0.0
--constraint=old-locale ==1.0.0.4 --constraint=network-uri ==2.6.0.1
--constraint=network ==2.6.0.2 --constraint=mtl ==2.2.1
--constraint=http-types ==0.8.5 --constraint=http-client-tls ==0.2.2
--constraint=http-client ==0.4.2 --constraint=hslua ==0.3.13
--constraint=highlighting-kate ==0.5.9 --constraint=haddock-library ==1.1.1
--constraint=filepath ==1.3.0.0 --constraint=extensible-exceptions ==0.1.1.4
--constraint=directory ==1.1.0.2 --constraint=deepseq-generics ==0.1.1.1
--constraint=data-default ==0.5.3 --constraint=containers ==0.4.2.1
--constraint=bytestring ==0.9.2.1 --constraint=blaze-markup ==0.6.1.1
--constraint=blaze-html ==0.7.0.3 --constraint=binary ==0.7.2.2
--constraint=base64-bytestring ==1.0.0.1 --constraint=base ==4.5.0.0
--constraint=array ==0.4.0.0 --constraint=aeson ==0.7.0.6 --constraint=SHA
==1.6.4.1 --constraint=JuicyPixels ==3.1.7.1 --constraint=HTTP ==4000.2.18
--disable-tests --disable-benchmarks
Configuring pandoc-1.13.1...
setup: At least the following dependencies are missing:
http-client >=0.3.2 && <0.4 && ==0.4.2
World file is already up to date.
cabal: Error: some packages failed to install:
pandoc-1.13.1 failed during the configure step. The exception was:
ExitFailure 1

奇怪的是安装了http-client:

What's weird is that http-client is installed:

$ cabal install http-client
Resolving dependencies...
All the requested packages are already installed:
http-client-0.4.2
Use --reinstall if you want to reinstall anyway.

这是怎么回事?

推荐答案

似乎 cabal 安装了一个太新版本的 http 客户端.我遇到了同样的问题,并通过这样做解决了

It seems cabal installed a too recent version of the http-client. I had the same problem and got over it by doing

cabal install --reinstall --force-reinstalls 'http-client < 0.4'
ghc-pkg unregister http-client-tls-0.2.2
ghc-pkg unregister http-client-0.4.2.2
cabal install pandoc

这篇关于由于http-client,pandoc无法安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆