WebFaction
Community site: login faq

Hello,

this is not a question, this is to document what I did to install yesod on my shared account. In case someone else needs it.

Before performing these steps you need to install GHC. See my other post at http://community.webfaction.com/questions/5084/building-ghc-from-source

So, here it is:

(instructions are based on http://blog.syntaxvssemantics.com/2010/10/installing-yesod-haskell-web-framework.html)

  1. install cabal-install

    cd
    mkdir t
    cd t
    wget http://www.haskell.org/cabal/release/cabal-install-0.10.2/cabal-install-0.10.2.tar.gz
    gunzip cabal-install-0.10.2.tar.gz
    tar xvf cabal-install-0.10.2.tar
    cd cabal-install-0.10.2
    chmod +x bootstrap.sh
    ./bootstrap.sh
    cd
    rm -r t
    

  2. add $HOME/.cabal/bin to your $PATH

  3. update packages

    cabal update
    

  4. attempt yesod installation

    cabal install yesod
    Note: this operation fails (see the link above for explanations), I ran it to install as many packages as possible automatically and to find out what packages needed to be installed manually.
    cabal: Error: some packages failed to install:
    aeson-0.3.2.9 depends on syb-0.3.3 which failed to install.
    authenticate-0.9.3.1 depends on syb-0.3.3 which failed to install.
    hamlet-0.8.2.1 failed during the building phase. The exception was:
    ExitFailure 1
    hjsmin-0.0.14 depends on language-javascript-0.4.5 which failed to install.
    http-enumerator-0.6.6 depends on monad-control-0.2.0.2 which failed to
    install.
    language-javascript-0.4.5 failed during the configure step. The exception was:
    ExitFailure 1
    monad-control-0.2.0.2 failed during the configure step. The exception was:
    ExitFailure 127
    persistent-0.5.1 depends on monad-control-0.2.0.2 which failed to install.
    persistent-template-0.5.1 depends on monad-control-0.2.0.2 which failed to
    install.
    pool-0.1.0.4 depends on monad-control-0.2.0.2 which failed to install.
    simple-sendfile-0.1.2 failed during the building phase. The exception was:
    ExitFailure 1
    syb-0.3.3 failed during the configure step. The exception was:
    ExitFailure 127
    unix-compat-0.2.2.1 failed during the building phase. The exception was:
    ExitFailure 1
    wai-app-static-0.1.0 depends on unix-compat-0.2.2.1 which failed to install.
    warp-0.4.3.1 depends on unix-compat-0.2.2.1 which failed to install.
    yesod-0.8.2.1 depends on language-javascript-0.4.5 which failed to install.
    yesod-auth-0.4.0.2 depends on hamlet-0.8.2.1 which failed to install.
    yesod-core-0.8.3.2 depends on hamlet-0.8.2.1 which failed to install.
    yesod-form-0.1.0.1 depends on hamlet-0.8.2.1 which failed to install.
    yesod-json-0.1.1.2 depends on hamlet-0.8.2.1 which failed to install.
    yesod-persistent-0.1.0 depends on hamlet-0.8.2.1 which failed to install.
    yesod-static-0.1.0.1 depends on unix-compat-0.2.2.1 which failed to install.
    

  5. install the rest of the packages manually:

    cd
    mkdir t
    cd t
    wget http://hackage.haskell.org/packages/archive/alex/3.0.1/alex-3.0.1.tar.gz
    wget http://hackage.haskell.org/packages/archive/hamlet/0.8.2.1/hamlet-0.8.2.1.tar.gz
    wget http://hackage.haskell.org/packages/archive/happy/1.18.6/happy-1.18.6.tar.gz
    wget http://hackage.haskell.org/packages/archive/language-javascript/0.4.5/language-javascript-0.4.5.tar.gz
    wget http://hackage.haskell.org/packages/archive/monad-control/0.2.0.2/monad-control-0.2.0.2.tar.gz
    wget http://hackage.haskell.org/packages/archive/simple-sendfile/0.1.2/simple-sendfile-0.1.2.tar.gz
    wget http://hackage.haskell.org/packages/archive/syb/0.3.3/syb-0.3.3.tar.gz
    wget http://hackage.haskell.org/packages/archive/unix-compat/0.2.2.1/unix-compat-0.2.2.1.tar.gz
    wget http://hackage.haskell.org/packages/archive/yesod/0.8.2.1/yesod-0.8.2.1.tar.gz
    gunzip -c alex-3.0.1.tar.gz | tar xvf -
    gunzip -c hamlet-0.8.2.1.tar.gz | tar xvf -
    gunzip -c happy-1.18.6.tar.gz | tar xvf -
    gunzip -c language-javascript-0.4.5.tar.gz | tar xvf -
    gunzip -c monad-control-0.2.0.2.tar.gz | tar xvf -
    gunzip -c simple-sendfile-0.1.2.tar.gz | tar xvf -
    gunzip -c syb-0.3.3.tar.gz | tar xvf -
    gunzip -c unix-compat-0.2.2.1.tar.gz | tar xvf -
    gunzip -c yesod-0.8.2.1.tar.gz | tar xvf -
    cd alex-3.0.1
    cabal install
    cd ../hamlet-0.8.2.1
    cabal install
    cd ../happy-1.18.6
    cabal install
    cd ../language-javascript-0.4.5
    cabal install
    cd ../monad-control-0.2.0.2
    cabal install
    cd ../simple-sendfile-0.1.2
    cabal install
    cd ../syb-0.3.3
    cabal install
    cd ../unix-compat-0.2.2.1
    cabal install
    cd ../yesod-0.8.2.1
    cabal install
    cd
    rm -r t
    

Hope this helps someone

Konstantin

asked 27 Aug '11, 12:16

akonsu
64614
accept rate: 100%

edited 27 Aug '11, 12:22

Thank you for sharing your experience.

(27 Aug '11, 12:24) bmeyer71 ♦♦

Thanks, this was a massive help.

(20 Nov '11, 18:28) dithyramble

I think you can get around the manual stuff by creating tmp in your home directory and doing,

env TMPDIR=$HOME/tmp cabal install yesod

which will redirect cabal to use a local tmp directory.

I had this problem with installing pandoc and darcs and it seemed to work well so far.

permanent link

answered 12 Feb '12, 11:13

milkypostman
1113
accept rate: 0%

edited 12 Feb '12, 11:14

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×7
×3
×2

question asked: 27 Aug '11, 12:16

question was seen: 3,088 times

last updated: 12 Feb '12, 11:14

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM