4

我今天尝试在我的 Ubuntu12.04 系统上安装 pandoc:

cabal install pandoc-1.11.1 -v3

我选择这个版本是因为我在我的另一个 ubuntu12.04 系统上使用它,但是在编译 Reader.Markdown 时它失败了。我不知道该怎么办,有什么帮助吗?

错误显示为:

searching for ghc in path.
found ghc at /usr/bin/ghc
("/usr/bin/ghc",["--numeric-version"])
/usr/bin/ghc is version 7.4.1
looking for tool "ghc-pkg" near compiler in /usr/bin
found ghc-pkg in /usr/bin/ghc-pkg
("/usr/bin/ghc-pkg",["--version"])
/usr/bin/ghc-pkg is version 7.4.1
("/usr/bin/ghc",["--supported-languages"])
("/usr/bin/ghc",["--info"])
Reading installed packages...
("/usr/bin/ghc-pkg",["dump","--global","-v0"])
("/usr/bin/ghc-pkg",["dump","--user","-v0"])
("/usr/bin/ghc",["--print-libdir"])
Reading available packages...
Choosing modular solver.
Resolving dependencies...
[__0] trying: blogmd-0.1.0.0 (user goal)
[__1] trying: base-4.5.0.0/installed-c8e... (dependency of blogmd-0.1.0.0)
[__2] trying: rts-1.0/installedbuil... (dependency of base-4.5.0.0/installed-c8e...)
[__3] trying: integer-gmp-0.4.0.0/installed-ec8... (dependency of base-4.5.0.0/installed-c8e...)
[__4] trying: ghc-prim-0.2.0.0/installed-bd2... (dependency of base-4.5.0.0/installed-c8e...)
[__5] next goal: pandoc (dependency of blogmd-0.1.0.0)
[__5] rejecting: pandoc-1.12.0.2, 1.12.0.1, 1.12 (conflict: blogmd => pandoc==1.11.1)
[__5] trying: pandoc-1.11.1
[__6] trying: pandoc-1.11.1:-embed_data_files
[__7] trying: pandoc-1.11.1:+blaze_html_0_5
[__8] trying: pandoc-1.11.1:!bench
[__9] trying: pandoc-1.11.1:!test

...

Flags chosen: embed_data_files=False, blaze_html_0_5=True
Dependency HTTP ==4000.2.8: using HTTP-4000.2.8
Dependency base ==4.5.0.0: using base-4.5.0.0
Dependency base64-bytestring ==1.0.0.1: using base64-bytestring-1.0.0.1
Dependency blaze-html ==0.6.1.1: using blaze-html-0.6.1.1
Dependency blaze-markup ==0.5.1.5: using blaze-markup-0.5.1.5
Dependency bytestring ==0.9.2.1: using bytestring-0.9.2.1
Dependency citeproc-hs ==0.3.8: using citeproc-hs-0.3.8
Dependency containers ==0.4.2.1: using containers-0.4.2.1
Dependency data-default ==0.5.3: using data-default-0.5.3
Dependency directory ==1.1.0.2: using directory-1.1.0.2
Dependency extensible-exceptions ==0.1.1.4: using
extensible-exceptions-0.1.1.4
Dependency filepath ==1.3.0.0: using filepath-1.3.0.0
Dependency highlighting-kate ==0.5.5: using highlighting-kate-0.5.5
Dependency json ==0.7: using json-0.7
Dependency mtl ==2.1.2: using mtl-2.1.2
Dependency network ==2.4.1.2: using network-2.4.1.2
Dependency old-locale ==1.0.0.4: using old-locale-1.0.0.4
Dependency old-time ==1.1.0.0: using old-time-1.1.0.0
Dependency pandoc -any: using pandoc-1.11.1
Dependency pandoc-types ==1.10: using pandoc-types-1.10
Dependency parsec ==3.1.3: using parsec-3.1.3
Dependency process ==1.1.0.1: using process-1.1.0.1
Dependency random ==1.0.1.1: using random-1.0.1.1
Dependency syb ==0.3.6: using syb-0.3.6
Dependency tagsoup ==0.12.8: using tagsoup-0.12.8
Dependency temporary ==1.1.2.4: using temporary-1.1.2.4
Dependency texmath ==0.6.4: using texmath-0.6.4
Dependency text ==0.11.1.13: using text-0.11.1.13
Dependency time ==1.4: using time-1.4
Dependency xml ==1.3.13: using xml-1.3.13
Dependency zip-archive ==0.1.3.4: using zip-archive-0.1.3.4
Dependency zlib ==0.5.3.3: using zlib-0.5.3.3
searching for alex in path.
found alex at /usr/bin/alex
("/usr/bin/alex",["--version"])
/usr/bin/alex is version 3.0.1
searching for ar in path.
found ar at /usr/bin/ar
searching for c2hs in path.
Cannot find c2hs on the path
searching for cpphs in path.
Cannot find cpphs on the path
searching for ffihugs in path.
Cannot find ffihugs on the path
searching for gcc in path.
found gcc at /usr/bin/gcc
("/usr/bin/gcc",["-dumpversion"])
/usr/bin/gcc is version 4.6
searching for greencard in path.
Cannot find greencard on the path
searching for haddock in path.
found haddock at /usr/bin/haddock
("/usr/bin/haddock",["--version"])
/usr/bin/haddock is version 2.10.0
searching for happy in path.
found happy at /usr/bin/happy
("/usr/bin/happy",["--version"])
/usr/bin/happy is version 1.18.9
searching for hmake in path.
Cannot find hmake on the path
searching for hpc in path.
found hpc at /usr/bin/hpc
("/usr/bin/hpc",["version"])
/usr/bin/hpc is version 0.6
looking for tool "hsc2hs" near compiler in /usr/bin
found hsc2hs in /usr/bin/hsc2hs
("/usr/bin/hsc2hs",["--version"])
/usr/bin/hsc2hs is version 0.67
searching for HsColour in path.
Cannot find HsColour on the path
searching for hugs in path.
Cannot find hugs on the path
searching for jhc in path.
Cannot find jhc on the path
searching for ld in path.
found ld at /usr/bin/ld
("/usr/bin/ghc",["-c","/tmp/29426.c","-o","/tmp/29426.o"])
("/usr/bin/ld",["-x","-r","/tmp/29426.o","-o","/tmp/29427.o"])
searching for lhc in path.
Cannot find lhc on the path
searching for lhc-pkg in path.
Cannot find lhc-pkg on the path
searching for nhc98 in path.
Cannot find nhc98 on the path
searching for pkg-config in path.
Cannot find pkg-config on the path
searching for ranlib in path.
found ranlib at /usr/bin/ranlib
searching for strip in path.
found strip at /usr/bin/strip
searching for tar in path.
found tar at /bin/tar
searching for uhc in path.
Cannot find uhc on the path
Using Cabal-1.14.0 compiled by ghc-7.4
Using compiler: ghc-7.4.1
Using install prefix: /home/lyntonzhang/.cabal
Binaries installed in: /home/lyntonzhang/.cabal/bin
Libraries installed in: /home/lyntonzhang/.cabal/lib/pandoc-1.11.1/ghc-7.4.1
Private binaries installed in: /home/lyntonzhang/.cabal/libexec
Data files installed in: /home/lyntonzhang/.cabal/share/pandoc-1.11.1
Documentation installed in: /home/lyntonzhang/.cabal/share/doc/pandoc-1.11.1
Using alex version 3.0.1 found on system at: /usr/bin/alex
Using ar found on system at: /usr/bin/ar
No c2hs found
No cpphs found
No ffihugs found
Using gcc version 4.6 found on system at: /usr/bin/gcc
Using ghc version 7.4.1 found on system at: /usr/bin/ghc
Using ghc-pkg version 7.4.1 found on system at: /usr/bin/ghc-pkg
No greencard found
Using haddock version 2.10.0 found on system at: /usr/bin/haddock
Using happy version 1.18.9 found on system at: /usr/bin/happy
No hmake found
Using hpc version 0.6 found on system at: /usr/bin/hpc
Using hsc2hs version 0.67 found on system at: /usr/bin/hsc2hs
No hscolour found
No hugs found
No jhc found
Using ld found on system at: /usr/bin/ld
No lhc found
No lhc-pkg found
No nhc98 found
No pkg-config found
Using ranlib found on system at: /usr/bin/ranlib
Using strip found on system at: /usr/bin/strip
Using tar found on system at: /bin/tar
No uhc found
("/usr/bin/gcc",["-Wl,--hash-size=31","-Wl,--reduce-memory-overheads","/tmp/29426.c","-o","/tmp/29426","-D__GLASGOW_HASKELL__=704","-Idist/build/autogen","-I.","-I/usr/lib/ghc/process-1.1.0.1/include","-I/usr/lib/ghc/time-1.4/include","-I/usr/lib/ghc/directory-1.1.0.2/include","-I/usr/lib/ghc/old-time-1.1.0.0/include","-I/home/lyntonzhang/.cabal/lib/network-2.4.1.2/ghc-7.4.1/include","-I/usr/lib/ghc/unix-2.5.1.0/include","-I/usr/lib/ghc/bytestring-0.9.2.1/include","-I/usr/lib/ghc/base-4.5.0.0/include","-I/usr/lib/ghc/include","-L/home/lyntonzhang/.cabal/lib/zip-archive-0.1.3.4/ghc-7.4.1","-L/usr/lib/haskell-packages/ghc/lib/zlib-0.5.3.3/ghc-7.4.1","-L/home/lyntonzhang/.cabal/lib/texmath-0.6.4/ghc-7.4.1","-L/home/lyntonzhang/.cabal/lib/xml-1.3.13/ghc-7.4.1","-L/home/lyntonzhang/.cabal/lib/temporary-1.1.2.4/ghc-7.4.1","-L/home/lyntonzhang/.cabal/lib/tagsoup-0.12.8/ghc-7.4.1","-L/usr/lib/haskell-packages/ghc/lib/random-1.0.1.1/ghc-7.4.1","-L/usr/lib/ghc/process-1.1.0.1","-L/home/lyntonzhang/.cabal/lib/highlighting-kate-0.5.5/ghc-7.4.1","-L/home/lyntonzhang/.cabal/lib/regex-pcre-builtin-0.94.4.7.8.31/ghc-7.4.1","-L/usr/lib/haskell-packages/ghc/lib/regex-base-0.93.2/ghc-7.4.1","-L/usr/lib/haskell-packages/ghc/lib/mtl-2.0.1.0/ghc-7.4.1","-L/usr/lib/haskell-packages/ghc/lib/transformers-0.2.2.0/ghc-7.4.1","-L/home/lyntonzhang/.cabal/lib/digest-0.0.1.2/ghc-7.4.1","-L/home/lyntonzhang/.cabal/lib/data-default-0.5.3/ghc-7.4.1","-L/home/lyntonzhang/.cabal/lib/data-default-instances-old-locale-0.0.1/ghc-7.4.1","-L/home/lyntonzhang/.cabal/lib/data-default-instances-dlist-0.0.1/ghc-7.4.1","-L/home/lyntonzhang/.cabal/lib/dlist-0.5/ghc-7.4.1","-L/home/lyntonzhang/.cabal/lib/data-default-instances-containers-0.0.1/ghc-7.4.1","-L/home/lyntonzhang/.cabal/lib/data-default-instances-base-0.0.1/ghc-7.4.1","-L/home/lyntonzhang/.cabal/lib/data-default-class-0.0.1/ghc-7.4.1","-L/home/lyntonzhang/.cabal/lib/citeproc-hs-0.3.8/ghc-7.4.1","-L/usr/lib/ghc/time-1.4","-L/home/lyntonzhang/.cabal/lib/pandoc-types-1.10/ghc-7.4.1","-L/home/lyntonzhang/.cabal/lib/json-0.7/ghc-7.4.1","-L/usr/lib/ghc/pretty-1.1.1.0","-L/home/lyntonzhang/.cabal/lib/hs-bibutils-5.0/ghc-7.4.1","-L/usr/lib/haskell-packages/ghc/lib/syb-0.3.6/ghc-7.4.1","-L/home/lyntonzhang/.cabal/lib/hexpat-0.20.3/ghc-7.4.1","-L/home/lyntonzhang/.cabal/lib/utf8-string-0.3.7/ghc-7.4.1","-L/usr/lib/ghc/extensible-exceptions-0.1.1.4","-L/usr/lib/ghc/directory-1.1.0.2","-L/usr/lib/ghc/filepath-1.3.0.0","-L/home/lyntonzhang/.cabal/lib/blaze-html-0.6.1.1/ghc-7.4.1","-L/home/lyntonzhang/.cabal/lib/blaze-markup-0.5.1.5/ghc-7.4.1","-L/home/lyntonzhang/.cabal/lib/blaze-builder-0.3.1.1/ghc-7.4.1","-L/usr/lib/ghc/binary-0.5.1.0","-L/usr/lib/ghc/containers-0.4.2.1","-L/home/lyntonzhang/.cabal/lib/base64-bytestring-1.0.0.1/ghc-7.4.1","-L/home/lyntonzhang/.cabal/lib/List-0.5.1/ghc-7.4.1","-L/home/lyntonzhang/.cabal/lib/HTTP-4000.2.8/ghc-7.4.1","-L/usr/lib/ghc/old-time-1.1.0.0","-L/usr/lib/ghc/old-locale-1.0.0.4","-L/home/lyntonzhang/.cabal/lib/network-2.4.1.2/ghc-7.4.1","-L/usr/lib/ghc/unix-2.5.1.0","-L/home/lyntonzhang/.cabal/lib/parsec-3.1.3/ghc-7.4.1","-L/usr/lib/haskell-packages/ghc/lib/text-0.11.1.13/ghc-7.4.1","-L/usr/lib/ghc/deepseq-1.3.0.0","-L/home/lyntonzhang/.cabal/lib/mtl-2.1.2/ghc-7.4.1","-L/home/lyntonzhang/.cabal/lib/transformers-0.3.0.0/ghc-7.4.1","-L/usr/lib/ghc/bytestring-0.9.2.1","-L/usr/lib/ghc/array-0.4.0.0","-L/usr/lib/ghc/base-4.5.0.0","-L/usr/lib/ghc/integer-gmp-0.4.0.0","-L/usr/lib/ghc/ghc-prim-0.2.0.0","-L/usr/lib/ghc"])
/tmp/pandoc-1.11.1-29370/pandoc-1.11.1/dist/setup/setup configure --verbose=3
--ghc --prefix=/home/lyntonzhang/.cabal --user --flags=-embed_data_files
--flags=blaze_html_0_5 --constraint=zlib ==0.5.3.3 --constraint=zip-archive
==0.1.3.4 --constraint=xml ==1.3.13 --constraint=time ==1.4 --constraint=text
==0.11.1.13 --constraint=texmath ==0.6.4 --constraint=temporary ==1.1.2.4
--constraint=tagsoup ==0.12.8 --constraint=syb ==0.3.6 --constraint=random
==1.0.1.1 --constraint=process ==1.1.0.1 --constraint=parsec ==3.1.3
--constraint=pandoc-types ==1.10 --constraint=old-time ==1.1.0.0
--constraint=old-locale ==1.0.0.4 --constraint=network ==2.4.1.2
--constraint=mtl ==2.1.2 --constraint=json ==0.7
--constraint=highlighting-kate ==0.5.5 --constraint=filepath ==1.3.0.0
--constraint=extensible-exceptions ==0.1.1.4 --constraint=directory ==1.1.0.2
--constraint=data-default ==0.5.3 --constraint=containers ==0.4.2.1
--constraint=citeproc-hs ==0.3.8 --constraint=bytestring ==0.9.2.1
--constraint=blaze-markup ==0.5.1.5 --constraint=blaze-html ==0.6.1.1
--constraint=base64-bytestring ==1.0.0.1 --constraint=base ==4.5.0.0
--constraint=HTTP ==4000.2.8 --disable-tests --disable-benchmarks
Using external setup method with build-type Custom
creating /tmp/pandoc-1.11.1-29370/pandoc-1.11.1/dist/setup
Using Cabal library version 1.14.0
Using /tmp/pandoc-1.11.1-29370/pandoc-1.11.1/Setup.hs as setup script.
creating dist/build
creating dist/build/autogen
Building pandoc-1.11.1...
Preprocessing library pandoc-1.11.1...
Building library...
creating dist/build
("/usr/bin/ghc",["--make","-package-name","pandoc-1.11.1","-v","-hide-all-packages","-fbuilding-cabal-package","-i","-idist/build","-isrc","-idist/build/autogen","-Idist/build/autogen","-Idist/build","-optP-include","-optPdist/build/autogen/cabal_macros.h","-odir","dist/build","-hidir","dist/build","-stubdir","dist/build","-package-id","HTTP-4000.2.8-38cfa9eb001dc096a2322525b343c875","-package-id","base-4.5.0.0-c8e7184681d410015e93df85fc49e9dd","-package-id","base64-bytestring-1.0.0.1-8861681d98d07ca1bd6021178e397139","-package-id","blaze-html-0.6.1.1-b629ace7677c9a90a3bf924727d6bbed","-package-id","blaze-markup-0.5.1.5-3ad15c648fab31c4e1ffe2f14dc5c629","-package-id","bytestring-0.9.2.1-4adca9710b1386944aaca5a7886ef98f","-package-id","citeproc-hs-0.3.8-37c83a865f08f5ec9126429e31ec7299","-package-id","containers-0.4.2.1-7c54595400348f577b3b4a45691c5afd","-package-id","data-default-0.5.3-efcd7c653eab26600a3f1f9dc1080e52","-package-id","directory-1.1.0.2-8957520ced1fb19160c3a6126dcccfaa","-package-id","extensible-exceptions-0.1.1.4-d27a1ac47e54880cae007cceceb41580","-package-id","filepath-1.3.0.0-674b8a582fb49f1c9724f50a6a5d5768","-package-id","highlighting-kate-0.5.5-b8aee7ed0991e011cb83ef818570be4e","-package-id","json-0.7-32ddb5e9e515360a309252068a497d00","-package-id","mtl-2.1.2-b4218b10f76494af94aa7e4a289ef6ff","-package-id","network-2.4.1.2-805eb55e9816f3d10322388767a4e316","-package-id","old-locale-1.0.0.4-29bd50ed2bb4a20928338f52e4ab1b71","-package-id","pandoc-types-1.10-2f1764bf1d59410ed40c1353f14caed1","-package-id","parsec-3.1.3-70ca601dfa4f285ef1ec63e38198250a","-package-id","process-1.1.0.1-91185c964ab744c1f3cbca1863d2ba45","-package-id","random-1.0.1.1-3bece392c9f5221263ed25c90c28e1ec","-package-id","syb-0.3.6-05925f4440bc3fbb54d5c12bac109e49","-package-id","tagsoup-0.12.8-d9dc16b0a5a834b5df04b4fc78c12c15","-package-id","temporary-1.1.2.4-14218d4c08a1601337ed533381e31b38","-package-id","texmath-0.6.4-2f4fcb0613992149f461413e42c18e76","-package-id","text-0.11.1.13-501afa4d95a2591bf1e0d0a57dc80a38","-package-id","time-1.4-3e186a51d3674e5d65b5a7925db3d3a7","-package-id","xml-1.3.13-8516278fb40b2a2f8c9ebd720024d3a8","-package-id","zip-archive-0.1.3.4-7cea4a0add4d54438ee3e9e6e183a035","-package-id","zlib-0.5.3.3-9ed15628a121b3b57f97b7acc02bf5d9","-O","-rtsopts","-Wall","-fno-warn-unused-do-bind","-XHaskell98","-XCPP","Text.Pandoc","Text.Pandoc.Options","Text.Pandoc.Pretty","Text.Pandoc.Shared","Text.Pandoc.Readers.HTML","Text.Pandoc.Readers.LaTeX","Text.Pandoc.Readers.Markdown","Text.Pandoc.Readers.MediaWiki","Text.Pandoc.Readers.RST","Text.Pandoc.Readers.DocBook","Text.Pandoc.Readers.TeXMath","Text.Pandoc.Readers.Textile","Text.Pandoc.Readers.Native","Text.Pandoc.Writers.Native","Text.Pandoc.Writers.Docbook","Text.Pandoc.Writers.HTML","Text.Pandoc.Writers.LaTeX","Text.Pandoc.Writers.ConTeXt","Text.Pandoc.Writers.OpenDocument","Text.Pandoc.Writers.Texinfo","Text.Pandoc.Writers.Man","Text.Pandoc.Writers.Markdown","Text.Pandoc.Writers.RST","Text.Pandoc.Writers.Org","Text.Pandoc.Writers.AsciiDoc","Text.Pandoc.Writers.Textile","Text.Pandoc.Writers.MediaWiki","Text.Pandoc.Writers.RTF","Text.Pandoc.Writers.ODT","Text.Pandoc.Writers.Docx","Text.Pandoc.Writers.EPUB","Text.Pandoc.Writers.FB2","Text.Pandoc.PDF","Text.Pandoc.UTF8","Text.Pandoc.Templates","Text.Pandoc.XML","Text.Pandoc.Biblio","Text.Pandoc.SelfContained","Text.Pandoc.MIME","Text.Pandoc.Parsing","Text.Pandoc.UUID","Text.Pandoc.ImageSize","Text.Pandoc.Slides","Text.Pandoc.Highlighting","Paths_pandoc"])
[ 1 of 45] Compiling Text.Pandoc.Pretty ( src/Text/Pandoc/Pretty.hs, dist/build/Text/Pandoc/Pretty.o )
[ 2 of 45] Compiling Text.Pandoc.Readers.TeXMath ( src/Text/Pandoc/Readers/TeXMath.hs, dist/build/Text/Pandoc/Readers/TeXMath.o )
[ 3 of 45] Compiling Text.Pandoc.UTF8 ( src/Text/Pandoc/UTF8.hs, dist/build/Text/Pandoc/UTF8.o )
[ 4 of 45] Compiling Text.Pandoc.PDF  ( src/Text/Pandoc/PDF.hs, dist/build/Text/Pandoc/PDF.o )
[ 5 of 45] Compiling Text.Pandoc.XML  ( src/Text/Pandoc/XML.hs, dist/build/Text/Pandoc/XML.o )
[ 6 of 45] Compiling Text.Pandoc.MIME ( src/Text/Pandoc/MIME.hs, dist/build/Text/Pandoc/MIME.o )
[ 7 of 45] Compiling Text.Pandoc.UUID ( src/Text/Pandoc/UUID.hs, dist/build/Text/Pandoc/UUID.o )
[ 8 of 45] Compiling Text.Pandoc.ImageSize ( src/Text/Pandoc/ImageSize.hs, dist/build/Text/Pandoc/ImageSize.o )
[ 9 of 45] Compiling Text.Pandoc.Slides ( src/Text/Pandoc/Slides.hs, dist/build/Text/Pandoc/Slides.o )
[10 of 45] Compiling Paths_pandoc     ( dist/build/autogen/Paths_pandoc.hs, dist/build/Paths_pandoc.o )
[11 of 45] Compiling Text.Pandoc.Shared ( src/Text/Pandoc/Shared.hs, dist/build/Text/Pandoc/Shared.o )
[12 of 45] Compiling Text.Pandoc.Highlighting ( src/Text/Pandoc/Highlighting.hs, dist/build/Text/Pandoc/Highlighting.o )
[13 of 45] Compiling Text.Pandoc.Options ( src/Text/Pandoc/Options.hs, dist/build/Text/Pandoc/Options.o )
[14 of 45] Compiling Text.Pandoc.Writers.Native ( src/Text/Pandoc/Writers/Native.hs, dist/build/Text/Pandoc/Writers/Native.o )
[15 of 45] Compiling Text.Pandoc.Readers.DocBook ( src/Text/Pandoc/Readers/DocBook.hs, dist/build/Text/Pandoc/Readers/DocBook.o )
[16 of 45] Compiling Text.Pandoc.Parsing ( src/Text/Pandoc/Parsing.hs, dist/build/Text/Pandoc/Parsing.o )
[17 of 45] Compiling Text.Pandoc.SelfContained ( src/Text/Pandoc/SelfContained.hs, dist/build/Text/Pandoc/SelfContained.o )
[18 of 45] Compiling Text.Pandoc.Biblio ( src/Text/Pandoc/Biblio.hs, dist/build/Text/Pandoc/Biblio.o )
[19 of 45] Compiling Text.Pandoc.Templates ( src/Text/Pandoc/Templates.hs, dist/build/Text/Pandoc/Templates.o )
[20 of 45] Compiling Text.Pandoc.Writers.OpenDocument ( src/Text/Pandoc/Writers/OpenDocument.hs, dist/build/Text/Pandoc/Writers/OpenDocument.o )
[21 of 45] Compiling Text.Pandoc.Writers.FB2 ( src/Text/Pandoc/Writers/FB2.hs, dist/build/Text/Pandoc/Writers/FB2.o )
[22 of 45] Compiling Text.Pandoc.Writers.Docx ( src/Text/Pandoc/Writers/Docx.hs, dist/build/Text/Pandoc/Writers/Docx.o )
[23 of 45] Compiling Text.Pandoc.Writers.ODT ( src/Text/Pandoc/Writers/ODT.hs, dist/build/Text/Pandoc/Writers/ODT.o )
[24 of 45] Compiling Text.Pandoc.Writers.RTF ( src/Text/Pandoc/Writers/RTF.hs, dist/build/Text/Pandoc/Writers/RTF.o )
[25 of 45] Compiling Text.Pandoc.Writers.MediaWiki ( src/Text/Pandoc/Writers/MediaWiki.hs, dist/build/Text/Pandoc/Writers/MediaWiki.o )
[26 of 45] Compiling Text.Pandoc.Writers.Textile ( src/Text/Pandoc/Writers/Textile.hs, dist/build/Text/Pandoc/Writers/Textile.o )
[27 of 45] Compiling Text.Pandoc.Writers.AsciiDoc ( src/Text/Pandoc/Writers/AsciiDoc.hs, dist/build/Text/Pandoc/Writers/AsciiDoc.o )
[28 of 45] Compiling Text.Pandoc.Writers.Org ( src/Text/Pandoc/Writers/Org.hs, dist/build/Text/Pandoc/Writers/Org.o )
[29 of 45] Compiling Text.Pandoc.Writers.RST ( src/Text/Pandoc/Writers/RST.hs, dist/build/Text/Pandoc/Writers/RST.o )
[30 of 45] Compiling Text.Pandoc.Writers.Man ( src/Text/Pandoc/Writers/Man.hs, dist/build/Text/Pandoc/Writers/Man.o )
[31 of 45] Compiling Text.Pandoc.Writers.Texinfo ( src/Text/Pandoc/Writers/Texinfo.hs, dist/build/Text/Pandoc/Writers/Texinfo.o )
[32 of 45] Compiling Text.Pandoc.Writers.ConTeXt ( src/Text/Pandoc/Writers/ConTeXt.hs, dist/build/Text/Pandoc/Writers/ConTeXt.o )
[33 of 45] Compiling Text.Pandoc.Writers.LaTeX ( src/Text/Pandoc/Writers/LaTeX.hs, dist/build/Text/Pandoc/Writers/LaTeX.o )
[34 of 45] Compiling Text.Pandoc.Writers.HTML ( src/Text/Pandoc/Writers/HTML.hs, dist/build/Text/Pandoc/Writers/HTML.o )
[35 of 45] Compiling Text.Pandoc.Writers.Markdown ( src/Text/Pandoc/Writers/Markdown.hs, dist/build/Text/Pandoc/Writers/Markdown.o )
[36 of 45] Compiling Text.Pandoc.Writers.EPUB ( src/Text/Pandoc/Writers/EPUB.hs, dist/build/Text/Pandoc/Writers/EPUB.o )
[37 of 45] Compiling Text.Pandoc.Writers.Docbook ( src/Text/Pandoc/Writers/Docbook.hs, dist/build/Text/Pandoc/Writers/Docbook.o )
[38 of 45] Compiling Text.Pandoc.Readers.Native ( src/Text/Pandoc/Readers/Native.hs, dist/build/Text/Pandoc/Readers/Native.o )
[39 of 45] Compiling Text.Pandoc.Readers.RST ( src/Text/Pandoc/Readers/RST.hs, dist/build/Text/Pandoc/Readers/RST.o )
[40 of 45] Compiling Text.Pandoc.Readers.LaTeX ( src/Text/Pandoc/Readers/LaTeX.hs, dist/build/Text/Pandoc/Readers/LaTeX.o )
/usr/bin/ghc returned ExitFailure 9

我只是清理我的 .cabal 和 .ghc 文件并尝试运行:

cabal install pandoc

错误是:

cabal: Error: some packages failed to install:
http-conduit-1.9.5.1 depends on socks-0.5.1 which failed to install.
mime-types-0.1.0.3 failed during the building phase. The exception was:
ExitFailure 9
pandoc-1.12.0.2 depends on socks-0.5.1 which failed to install.
socks-0.5.1 failed during the building phase. The exception was:
ExitFailure 1

有什么办法可以在新机器上安装 pandoc?

然后我再次清理 .ghc 和 .cabal 文件,然后运行:

cabal install snap-1.11.1

这次错误是:

[35 of 45] Compiling Text.Pandoc.Parsing ( src/Text/Pandoc/Parsing.hs,        dist/build/Text/Pandoc/Parsing.o )
cabal: Error: some packages failed to install:
pandoc-1.11.1 failed during the building phase. The exception was:
ExitFailure 9

我花了一整天的时间试图让它工作,现在我想我必须放弃。


我的记忆是:

~$ free -m
             total       used       free     shared    buffers     cached
Mem:          1000        958         42          0         25        228
-/+ buffers/cache:        705        295
Swap:          255        255          0

我还有295M,所以我认为不是因为内存不够。

4

3 回答 3

3

你的机器上有多少内存?看起来当编译器内存不足时会出现错误。

于 2013-09-27T14:51:43.653 回答
2

正如约翰所说,使用 1G 的内存,您可能会耗尽内存,这取决于正在运行的其他大型进程。另一种检查方法是在安装期间使用 top 或 htop 观察内存使用情况。在顶部,您可以键入m以在顶部显示大型进程,并s 0.1使其更新更快。

+RTS -M200m您可以通过将 eg 添加到 cabal install 命令来影响 cabal 使用更少的内存。这并不准确,您不应该使用太多或太少,因此您可能需要向上或向下调整该数字。如果您的阴谋集团拒绝该选项,它可能会拒绝,那么首先使用 rtsopts 选项重新安装它:

cabal install cabal-install --ghc-options=-rtsopts

或者,在安装完成之前暂时终止一些其他大型进程。

或者,尝试分阶段进行 cabal 安装,首先安装主要依赖项,最后安装所需的包。

于 2013-09-27T20:35:16.950 回答
0

当我尝试使用 cabal 制作 Idris 编程语言时,我在树莓派 3 上遇到了同样的问题。我得到了带有以下描述的 ExitFailure (-9):这可能是由于内存不足造成的。我通过增加交换空间解决了这个问题。首先我编辑/etc/dphys-swapfile(更改CONF_SWAPSIZE=100)并将大小更改为 512 MB。然后:

/etc/init.d/dphys-swapfile stop
/etc/init.d/dphys-swapfile start
于 2016-06-27T09:40:15.660 回答