Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pandoc can't install due to http-client

Tags:

pandoc

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

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.

What's going on here?

like image 362
paleozogt Avatar asked Oct 23 '14 18:10

paleozogt


People also ask

How do I install Pandoc in R?

Using the R package installr , and then run installr::install. pandoc() . It will automatically install the Windows msi and add the PATH for you. You may review the user path in environment variables: C:\Users\user_name\AppData\Local\Pandoc\ .

Can you pip install Pandoc?

Installing via pipIf you want pandoc included out of the box, you can utilize our pypandoc_binary package, which are identical to the "pypandoc" package, but with pandoc included.

What is the latest version of Pandoc?

pandoc 2.19. 1 (2022-08-18)


1 Answers

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
like image 51
Kristoffer Nyberg Avatar answered Dec 04 '22 19:12

Kristoffer Nyberg