Pandoc 설치 (docverter에 필요) . 우분투 12.04에 설치하고 있으므로 처음으로했습니다 sudo

내 인생에서는 pandoc을 설치하는 방법을 알 수 없습니다. 나는 그것의 Github 저장소에 권장 된 접근 방식과 pandoc 사이트에서 권장되는 3 가지 접근 방식 을 모두 시도했다 . 우분투 12.04에 설치하고 있으므로 처음으로했습니다 sudo apt-get install haskell-platform.

각 단계에서 오류가 발생한 위치는 다음과 같습니다.

1) Github 저장소에 권장 된대로 설치 :

# cabal install --enable-tests
Registering zlib-conduit-1.0.0...
cabal: Error: some packages failed to install:
http-conduit-1.9.4.5 depends on mime-types-0.1.0.3 which failed to install.
mime-types-0.1.0.3 failed during the building phase. The exception was:
ExitFailure 9
pandoc-1.12 depends on mime-types-0.1.0.3 which failed to install.

2) Pandoc 사이트의 기본 설치 방법 :

# cabal install pandoc
[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

3) “내 배포판에 GHC 6.12가있는 경우”

# cabal install cabal-install
[46 of 67] Compiling Distribution.Simple.LocalBuildInfo ( Distribution/Simple/LocalBuildInfo.hs, dist/build/Distribution/Simple/LocalBuildInfo.o )
cabal: Error: some packages failed to install:
Cabal-1.16.0.3 failed during the building phase. The exception was:
ExitFailure 9
cabal-install-1.16.0.2 depends on Cabal-1.16.0.3 which failed to install.

4) 타르볼 설치 :

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



답변

repos에서 직접 설치할 수 있습니다.

sudo apt-get install pandoc


답변

설치 cabal가 VM에서 많은 디스크 공간을 deb차지한다는 것을 알았으므로 pandoc 개발자가 제공 하는 디스크 공간을 사용하는 것을 선호 합니다. 다음은 현재 deb (pandoc v15.1.1의 경우)를 다운로드하여 설치하는 방법입니다.

sudo wget https://github.com/jgm/pandoc/releases/download/1.15.1/pandoc-1.15.1-1-amd64.deb
sudo dpkg -i pandoc-1.15.1-1-amd64.deb

https://github.com/jgm/pandoc/releases/ 에서 최신 릴리스 번호를 확인할 수 있습니다.



답변

Stephane Laurent이 지적한 것처럼 repos의 pandoc 버전은 최신 버전과 거리가 멀고로 인용을 처리하는 등의 멋진 기능을 허용하지 않습니다 --biblio. pandoc 웹 사이트github 의 지침을 사용하여 최신 버전을 설치하는 데 어려움을 겪었 지만 Ubuntu 13.10에서 최종적으로 수행 한 방법은 다음과 같습니다.

  1. 설치 cabal

    sudo apt-get install cabal-install
    
  2. cabal패키지 데이터베이스 업데이트

    cabal update
    
  3. 확인 경로가 있음 cabal에 있습니다 시작 PATH의 (끝에서 여기 )

    PATH=$HOME/.cabal/bin:$PATH
    
  4. 사용하여 cabal설치 alexhappy

    cabal install alex happy
    
  5. cabal설치 pandocpandoc-citeproc원할 경우 사용

    cabal install pandoc pandoc-citeproc
    
  6. 판독 버전을 확인하여 설치 확인

    pandoc --version
    

~ / .profile에PATH=$HOME/.cabal/bin:$PATH 명령 을 추가 해야 다음에 다시 시작할 때 사용할 수 있습니다. 행복한 전환!


답변

클라우드의 512MB 시스템에 pandoc을 설치하는 데 비슷한 문제가 발생했습니다. 이 질문 에 대한 의견에 따르면 ExitFailure 9너무 많은 메모리를 사용했기 때문에 GHC가 SIGKILL을 받고 있었기 때문에 얻고 있습니다. 나에게 이것은 verbose가 켜져있는 유용한 메시지가 없다는 것을 설명했다. cabal-dev install pandoc --ghc-options="-O0"훨씬 작은 메모리 공간으로 pandoc 컴파일 을 설치하고 설치하여 ghc 최적화를 해제했습니다 . 프로덕션 환경에 있다면 현명한 아이디어가 아닙니다!


답변