CentOS6.4へhaskell(ghc-7.6.3), haskell-platform-2013.2.0.0, pandocインストール

CentOS6.4へhaskell(ghc-7.6.3), haskell-platform-2013.2.0.0, pandocをインストールするには、次のようなインストールスクリプトを用意して実行します。

#!/bin/sh
base="$HOME/applications/haskell"
hp_ver="2013.2.0.0"
ghc_ver="7.6.3"
hp="haskell-platform-${hp_ver}"
ghc="ghc-${ghc_ver}"

mkdir -p ${base}/src
cd ${base}/src
wget http://lambda.haskell.org/platform/download/${hp_ver}/${hp}.tar.gz
wget http://www.haskell.org/ghc/dist/${ghc_ver}/${ghc}-x86_64-unknown-linux.tar.bz2
tar xf ${hp}.tar.gz
tar xf ${ghc}-x86_64-unknown-linux.tar.bz2
cd ${base}/src/${ghc}/
./configure --prefix=${base}/${ghc}
make install
cd ${base}/src/${hp}/
export PATH=${base}/${ghc}/bin:$PATH
./configure --prefix=${base}/${hp}
make
make install

export PATH=${base}/${hp}/bin:$HOME/.cabal/bin:$PATH
cabal update
cabal install cabal-install
cabal install pandoc

インストールができたら、下記を .bash_profile などへ追加しておきます。

PATH=$HOME/applications/haskell/ghc-7.6.3/bin:$PATH
PATH=$HOME/applications/haskell/haskell-platform-2013.2.0.0/bin:$PATH
PATH=$HOME/.cabal/bin:$PATH
export $PATH

追記:先に.bash_profileへ追記しておいた方が良いようです。

同じタグの記事: cabal
同じタグの記事: CentOS
同じタグの記事: CentOS6
同じタグの記事: GHC
同じタグの記事: Haskell
同じタグの記事: Haskell Platform
同じタグの記事: Pandoc
同じカテゴリの記事: Linux
関連書籍: CentOS
関連書籍: Haskell