Installing Haskell Platform on Ubuntu

Home / Installing Haskell Platform on Ubuntu

Installing Haskell Platform on Ubuntu

December 9, 2015 | Article | No Comments

Haskell is advanced purely-functional programming language. An open-source product allows rapid development of robust, concise, correct software. It is also have strong support for integration with other language, built in concurrency and parallelism, debuggers, profilers, rich libraries, and an active community.

In this article we will discuss about how to install Haskell platform for Ubuntu. Any Ubuntu version and any architecture is fine. However in this article I will use Ubuntu 12.10 desktop edition.

I assume you have never install Haskell before. But if you have, you can read this section first.

In the rest of article, I assume you use / acquire root privileges to do installation. Otherwise, use

sudo su

to obtain it.

Prerequisite

Before we do installation, we have to fulfill the dependencies.

apt-get install libedit2 libedit2-dev freeglut2-dev libglu1-mesa-dev

Obtain the Material

The latest haskell version is 7.6.3 which can be downloaded from here. There are two choice depends on what architecture your computer has: i386 (for 32 bit) and x86_64 (for 64 bit). Any of them is fine, adjust it with your own machine.

Once you have download, extract it. We will refer this directory as ghc_dir

For example, this commands will download and extract for the 64 bit version

wget http://haskell.org/ghc/dist/7.6.3/ghc-7.6.3-x86_64-unknown-linux-n.tar.bz2
tar -xf ghc-7.6.3-x86_64-unknown-linux-n.tar.bz2

Next download Haskell Platform. The latest platform can be downloaded from here. Then extract it. We will refer this directory as ghc_platform

wget http://lambda.haskell.org/platform/download/2013.2.0.0/haskell-platform-2013.2.0.0.tar.gz
tar -xf haskell-platform-2013.2.0.0.tar.gz

Installation

This section will have compilation and installation from source.

First, go to ghc_dir and do

./configure
make
make install

Next, go to ghc_platform and do

./configure
make
make install

Along the way, the install scripts for Haskell Platform will give you prompts for the next step to take.

Have Installed Haskell Before?

If you happen to install Haskell before, you can read this section. If you are not, then you can finish reading the article.

If you have installed ghc6 before, you should remove that haskell package to avoid conflict

Then update the repository to get the latest index.

apt-get autoremove ghc6

If you install cabal separately (without haskell platform) you also have to remove it. The one you have to remove would be the executable only. For example we install it as /usr/local/sbin/cabal then:

Then update the repository to get the latest index.

rm /usr/local/sbin/cabal

About Author

about author

xathrya

A man who is obsessed to low level technology.

Leave a Reply

Your email address will not be published. Required fields are marked *

Social media & sharing icons powered by UltimatelySocial