简体   繁体   中英

Error Installing Latest Haskell source on Ubuntu Server 12.04

I trying to install the latest ghc (ghc-7.8.4-src.tar.bz2) on my ubuntu server version 12.04.

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.04 LTS
Release:        12.04
Codename:       precise

I know ghc needs a pre existing installation to compile. So I tried with sudo apt-get install ghc and sudo apt-get install haskell-platform . Either case gives me the below error when I run sudo make install . i) Any ideas on solving this? Also, ii) it takes quite a long time to compile, and even get to this point. So is there a way to vet the compilation before hand?

...
Installing library in /usr/local/lib/ghc-7.8.4/ghc-prim-0.3.1.0
ghc-cabal: Error: Could not find module: GHC.PrimopWrappers with any   suffix:
["p_hi"] in the search path: ["dist-install/build"]
make[1]: *** [install_packages] Error 1
make: *** [install] Error 2

Ok, solved this with the help of the fine folks on IRC (#haskell). Turns out that compiling ghc from source is really reserved for hacking on the compiler itself. So I was recommended the GHC binary package. That's presently GHC 7.8.4 .

From there, ./configure and sudo make install worked for my platform. With a working ghc, you can then get the latest Cabal . Cabal library needs to be built, and cabal-install is a binary. They are currently both at 1.22.0.0.

Hope this helps someone.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM