简体   繁体   English

在Ubuntu Server 12.04上安装最新的Haskell源时出错

[英]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. 我试图在我的ubuntu服务器版本12.04上安装最新的ghc(ghc-7.8.4-src.tar.bz2)。

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. 我知道ghc需要一个预先存在的安装来编译。 So I tried with sudo apt-get install ghc and sudo apt-get install haskell-platform . 所以我尝试使用sudo apt-get install ghcsudo apt-get install haskell-platform Either case gives me the below error when I run sudo make install . 当我运行sudo make install时,这两种情况都给出了以下错误。 i) Any ideas on solving this? i)有关解决这个问题的任何想法? Also, ii) it takes quite a long time to compile, and even get to this point. 此外, ii)编译需要相当长的时间,甚至达到这一点。 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). 好的,在IRC(#haskell)的优秀人员的帮助下解决了这个问题。 Turns out that compiling ghc from source is really reserved for hacking on the compiler itself. 事实证明,从源代码编译ghc实际上是为编译器本身的黑客攻击而保留的。 So I was recommended the GHC binary package. 所以我推荐了GHC二进制包。 That's presently GHC 7.8.4 . 那是目前的GHC 7.8.4

From there, ./configure and sudo make install worked for my platform. 从那里, ./configuresudo make install适用于我的平台。 With a working ghc, you can then get the latest Cabal . 通过工作ghc,您可以获得最新的Cabal Cabal library needs to be built, and cabal-install is a binary. 需要构建Cabal库,cabal-install是二进制文件。 They are currently both at 1.22.0.0. 他们目前都在1.22.0.0。

Hope this helps someone. 希望这有助于某人。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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