0

i am installing haskell code is as follow

git clone git://github.com/ghc/ghc.git && cd ghc && ./sync-all get
cd ghc && ./sync-all get cd ghc && ./boot && ./configure && make && make install

when i try with ./sync-all get i get following error:

Cloning into 'ghc'...
/bin/sh: 1: ./sync-all: not found

when i try without ./sync-all in code i get following error

    It seems you cloned this repository from GitHub. But your git config files
don't contain the url rewrites that are needed to make this work (GitHub
doesn't support '/' in repository names, so we use a different naming scheme
for the submodule repositories there).

Please run the following commands first:

  git config --global url."git://github.com/ghc/packages-".insteadOf     git://github.com/ghc/packages/
  git config --global url."http://github.com/ghc/packages-".insteadOf    http://github.com/ghc/packages/
  git config --global url."https://github.com/ghc/packages-".insteadOf   https://github.com/ghc/packages/
  git config --global url."ssh://[email protected]/ghc/packages-".insteadOf ssh://[email protected]/ghc/packages/
  git config --global url."[email protected]:/ghc/packages-".insteadOf      [email protected]:/ghc/packages/

And then:

  git submodule update --init
  ./boot

Or start over, and clone the GHC repository from the haskell server:

  git clone --recursive git://git.haskell.org/ghc.git

For more information, see:
  * https://ghc.haskell.org/trac/ghc/wiki/Newcomers or
  * https://ghc.haskell.org/trac/ghc/wiki/Building/GettingTheSources#CloningfromGitHub

please provide me the solution

8
  • How many things you compile at the same time? Your question regarding Apache is answered. askubuntu.com/q/677883/367165
    – A.B.
    Sep 24, 2015 at 14:07
  • i have many vm running having ubuntu:15.04 vivid
    – R_SS
    Sep 24, 2015 at 14:09
  • Edit your question and add the output of apt-cache policy ghc-7.10.3
    – A.B.
    Sep 25, 2015 at 12:50
  • Sorry, apt-cache, changed my comment
    – A.B.
    Sep 25, 2015 at 12:52
  • test@pts00449-vm4:~$ apt-cache policy ghc-7.10.3 N: Unable to locate package ghc-7.10.3 N: Couldn't find any package by regex 'ghc-7.10.3'
    – R_SS
    Sep 25, 2015 at 12:53

2 Answers 2

2

The Haskell Platform is available via the Ubuntu repository's.

Haskell Platform

To install via repo, just do like so:

  • sudo apt-get install haskell-platform

Install via website:

  • wget https://haskell.org/platform/download/7.10.2/haskell-platform-7.10.2-a-unknown-linux-deb7.tar.gz

  • tar xf haskell-platform-7.10.2-a-unknown-linux-deb7.tar.gz

  • sudo ./install-haskell-platform.sh

Haskell Compiler

To install the Haskell Compiler, follow the steps one by one.

  • sudo apt-get update
  • sudo apt-get install -y software-properties-common
  • sudo add-apt-repository -y ppa:hvr/ghc
  • sudo apt-get update
  • sudo apt-get install -y cabal-install-1.20 ghc-7.8.4
cat >> ~/.bashrc <<EOF
export PATH="\$HOME/.cabal/bin:/opt/cabal/1.20/bin:/opt/ghc/7.8.4/bin:\$PATH"
EOF
export PATH=~/.cabal/bin:/opt/cabal/1.20/bin:/opt/ghc/7.8.4/bin:$PATH
  • cabal update

  • cabal install alex happy

5
  • You're right, it works =)
    – A.B.
    Sep 28, 2015 at 14:19
  • i need haskel compiler not the haskell platform. As you can check git://github.com/ghc/ghc.git repo
    – R_SS
    Sep 28, 2015 at 14:22
  • @Ravi_SS I updated my answer on how to install the Haskell Compiler!
    – blade19899
    Sep 28, 2015 at 14:36
  • @blade19899 apt-get install ghc-7.8.4. This command is giving an error Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package ghc-7.8.4 E: Couldn't find any package by regex 'ghc-7.8.4'
    – R_SS
    Sep 29, 2015 at 9:24
  • @Ravi_SS I had a similar error for the cabal package. I did apt-cache search ghc- to find the available ones (and apt-cache search cabal for checking cabal versions).
    – Sam
    Nov 15, 2018 at 9:40
0

As described in the README, clone the repository via

git clone --recursive git://git.haskell.org/ghc.git

After that

cd ghc
./boot
./configure
make
sudo make install

The Problem

$ ./configure             
checking for gfind... no
checking for find... /usr/bin/find
checking for sort... /usr/bin/sort
checking for GHC version date... inferred 7.11.20150924
checking for GHC Git commit id... inferred 1395185f56cda4774d27ae419b10f570276b674d
checking for ghc... /usr/bin/ghc
checking version of ghc... 7.6.3
configure: error: GHC version 7.8 or later is required to compile GHC.

Therefore for (amd64 and i386)

sudo apt-add-repository ppa:hvr/ghc
sudo apt-get update
sudo apt-get install ghc-7.10.3 

But this piece of ... is installed in /opt therefore you have to create some symbolic links or you have to adjust a few paths.

6
  • apt-get install dialog - fine apt-get install software-properties-common - fine apt-get install ghc-7.10.3 - Error as follow Reading package lists...Done Building dependency tree Reading state information... Done E: Unable to locate package ghc-7.10.3 E: Couldn't find any package by regex 'ghc-7.10.3'
    – R_SS
    Sep 25, 2015 at 9:03
  • You forgot sudo apt-add-repository ppa:hvr/ghc; sudo apt-get update
    – A.B.
    Sep 25, 2015 at 9:12
  • above mentioned steps are done with apt-get install dialog
    – R_SS
    Sep 25, 2015 at 9:14
  • And you ask again new questions in the comments. Your question is: How do I install software from a PPA?
    – A.B.
    Sep 25, 2015 at 9:15
  • i see no heskell installed.
    – R_SS
    Sep 25, 2015 at 9:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .