Skip to content

Instantly share code, notes, and snippets.

@letsspeak
Last active Dec 17, 2015
Embed
What would you like to do?
set up yesod on ec2 Amazon Linux AMI 2013.03.1 64bit to make haskell-platform switch to small instance (m1.small) temporarily.
# sudo su
// install apache
# yum -y install httpd
// install develop tools for installing ghc
# yum -y install gcc
// install ghc 7.4.2
# wget http://www.haskell.org/ghc/dist/7.4.2/ghc-7.4.2-x86_64-unknown-linux.tar.bz2
# tar xvfj ghc-7.4.2-x86_64-unknown-linux.tar.bz2
# cd ghc-7.4.2
# ./configure --prefix=/usr/local/haskell/ghc/7.4.2
# make install
// set PATH for ghc
# vim /root/.bashrc
---
export PATH=/usr/local/haskell/ghc/7.4.2/bin:$PATH
---
# exit
# sudo su
// install develop tools for installing haskell-platform
# yum -y install gmp-devel
# yum -y install zlib-devel
# yum -y install freeglut-devel
// install haskell-platform 2012.4.0.0
# wget http://lambda.haskell.org/platform/download/2012.4.0.0/haskell-platform-2012.4.0.0.tar.gz
# tar xvfz haskell-platform-2012.4.0.0.tar.gz
# cd haskell-platform-2012.4.0.0
# ./configure --prefix=/usr/local/haskell/haskell-platform/2012.4.0.0
# make
# make install
----
haskell-platform make failed with out of memory on micro instacne (t1.micro)
to complete make, switch to small instance (m1.small) temporarily
----
Building cabal-install-0.14.0
"/usr/local/haskell/ghc/7.4.2/bin/ghc" "--make" "Setup" "-o" "Setup" "-package" "Cabal-1.14.0"
Linking Setup ...
"./Setup" "configure" "--package-db=../../packages/package.conf.inplace" "--prefix=/usr/local/haskell/haskell-platform/2012.4.0.0" "--with-compiler=/usr/local/haskell/ghc/7.4.2/bin/ghc" "--with-hc-pkg=/usr/local/haskell/ghc/7.4.2/bin/ghc-pkg" "--with-hsc2hs=/usr/local/haskell/ghc/7.4.2/bin/hsc2hs" "--with-happy=../happy-1.18.10/dist/build/happy/happy" "--happy-options=--template=../happy-1.18.10" "--with-alex=../alex-3.0.2/dist/build/alex/alex" "--enable-library-profiling" "--ghc-pkg-option=--package-conf=../../packages/package.conf.inplace"
Configuring cabal-install-0.14.0...
"./Setup" "build"
Building cabal-install-0.14.0...
Preprocessing executable 'cabal' for cabal-install-0.14.0...
Linking dist/build/cabal/cabal ...
collect2: ld terminated with signal 9 [強制終了]
---
// set PATH for haskell-platform
# vim /root/.bashrc
---
export PATH=/usr/local/haskell/haskell-platform/2012.4.0.0/bin:$PATH
---
# exit
# sudo su
// update cabal
# cabal update
# cabal install cabal-install
----
cabal-install failed with out of memory on micro instacne (t1.micro)
to complete, switch to small instance (m1.small) temporarily
----
Linking dist/build/cabal/cabal ...
cabal: Error: some packages failed to install:
cabal-install-1.16.0.2 failed during the building phase. The exception was:
ExitFailure 9
---
// set PATH for cabal
# vim /root/.bashrc
---
export PATH=$HOME/.cabal/bin:$PATH
---
# exit
# sudo su
// install yesod
# cabal install yesod-platform
# cabal install yesod-bin
# yesod
Usage: yesod [-d|--dev] [-v|--verbose] COMMAND
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment