[GHC] #9942: install GHC 7.8.1 at Ubuntu 13.10

GHC ghc-devs at haskell.org
Wed Dec 31 02:20:52 UTC 2014


#9942: install GHC 7.8.1 at Ubuntu 13.10
-------------------------------------+-------------------------------------
              Reporter:              |             Owner:
  derekbarnes361                     |            Status:  new
                  Type:  feature     |         Milestone:
  request                            |           Version:  7.8.4
              Priority:  lowest      |  Operating System:  Unknown/Multiple
             Component:  Compiler    |   Type of failure:  None/Unknown
              Keywords:              |        Blocked By:
          Architecture:              |   Related Tickets:
  Unknown/Multiple                   |
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------
 Because you are on a unix-like system (Ubuntu) you can do the following:

 Choose a folder you like for installing ghc (e.g. in a subfolder of your
 home directory like $HOME/ghc7.8.1 or in a subfolder of /opt like
 /opt/ghc7.8.1 – I would prefer the later one if you are the only user of
 your computer and the first one if this isn't the case). See this
 wikipedia article for explanations about the unix directory structure.
 Download the source code into that folder and follow the installation
 instructions:

 See also
 https://ghc.haskell.org/trac/ghc/wiki/Building/Using#Runtheconfigurescript
 In configure setp its important, that you set the --prefix to the folder
 you have chosen above (if you don't do this, ghc will be installed in
 /usr/local/ which you do not want)! For example:

  ./configure --prefix=/opt/ghc7.8.1
 After the installations look for the folder with the created binaries (it
 will be called bin if you did not use another name for bindir). Lets
 imagine this folder is /opt/ghc7.8.1/bin.

 Now you have two possibilities:

 Solution with creating symlinks: Create symlinks in a folder which is in
 your $PATH pointing to the created binaries (for example /usr/local/bin or
 $HOME/bin – I would use the first one, if you are the only user on your
 computer and the second if, if you are not). Therefore you have to use the
 command line tool ln. For example:

 sudo ln -s -T /opt/ghc7.8.1/bin/runghc /usr/local/bin/runghc7.8.1
 After this command there is a file /usr/local/bin/runghc7.8.1 pointing to
 the binary /opt/ghc7.8.1/bin/runghc. Executing /usr/local/bin/runghc7.8.1
 via typing runghc7.8.1 will now execute the runghc binary created in /opt
 (Note: sudo is not necessary if you create your symlink in $HOME/bin – it
 is just needed because root can create files under /usr)

 Solution with bash aliases: Write in your $HOME/.bash_aliases (@Others:
 you can alternatively choose $HOME/.bashrc or $HOME/.profile depending of
 your system/preference) the following line:

 alias runghc7.8.1='/opt/ghc7.8.1/bin/runghc'
 Now typing runghc7.8.1 in your terminal is an shortcut (alias) for typing
 /opt/ghc7.8.1/bin/runghc and will execute this binary.

 Note, that with this solution typing runghc7.8.1 will just work, when you
 typed it into your terminal. There are cases, when it does not work (for
 example calling runghc7.8.1 in a script).

 Send From: [http://www.vigrxtrial.net/]

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9942>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list