在OS X上,Cabal 1.18几乎可以提供总线错误10 [英] Cabal 1.18 gives Bus Error 10 on nearly everything on OS X

查看:90
本文介绍了在OS X上,Cabal 1.18几乎可以提供总线错误10的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将Cabal从Haskell平台的1.16版本升级到1.18,但几乎每个命令都立即死亡,并且总线错误:10

  $ cabal install aeson 
总线错误:10

$ cabal sandbox init
总线错误:10

$ cabal list
Bus error:10

cabal help 仍然有效,但)

操作系统版本:OS X Mavericks 10.9.1



Cabal版本:

  $ cabal --version 
cabal-install version 1.18.0.2
使用Cabal库的版本1.18.1.2

GHC版本:

  $ ghc --version 
Glorious Glasgow Haskell编译系统,版本7.6.3


解决方案

我和cabal有类似的问题。安装真正的gcc似乎有帮助(至少在OS X 10.8.5 Mountain Lion上使用Xcode 5.0.2):

pre> brew tap自制软件/版本
brew安装gcc48
#去吃午餐...或者电影



然后编辑 /Library/Frameworks/GHC.framework/Versions/7.6.3-i386/usr/lib/ghc-7.6.3/settings (以root身份)并放入

pre $ (C编译器命令,/usr/local/bin/gcc-4.8),

而不是 / usr / bin / gcc



然后

  rm -rf〜/ .ghc〜/ .cabal〜/ Library / Haskell 

像往常一样小心使用 rm -rf 但似乎有必要,因为即使使用 gcc-4.8 ,Cabal-the-library的缓存版本也会导致公交错误(这表明问题可能与Cabal库相反比cabal-install本身)。



请注意Haskell平台的全新安装对我来说不起作用,无论是否有vari铛铛包装。


I upgraded Cabal from the 1.16 version that came with Haskell Platform to 1.18, but nearly every command immediately dies with Bus error: 10:

$ cabal install aeson
Bus error: 10

$ cabal sandbox init
Bus error: 10

$ cabal list
Bus error: 10

(cabal help still works, though)

OS version: OS X Mavericks 10.9.1

Cabal versions:

$ cabal --version
cabal-install version 1.18.0.2
using version 1.18.1.2 of the Cabal library

GHC version:

$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.6.3

解决方案

I had similar problem with cabal. Installing real gcc seems to help (at least on OS X 10.8.5 Mountain Lion with Xcode 5.0.2):

brew tap homebrew/versions
brew install gcc48
# go for lunch ... or maybe movie

Then edit /Library/Frameworks/GHC.framework/Versions/7.6.3-i386/usr/lib/ghc-7.6.3/settings (as root) and put

("C compiler command", "/usr/local/bin/gcc-4.8"),

instead of /usr/bin/gcc

Then

rm -rf ~/.ghc ~/.cabal ~/Library/Haskell

As usual be careful with rm -rf but it seems necessary as cached version of Cabal-the-library lead to bus error even with gcc-4.8 (which suggests the problem may be with the Cabal library rather than cabal-install itself).

NB the fresh install of Haskell Platform alone did not work for me, either with or without various clang wrappers.

这篇关于在OS X上,Cabal 1.18几乎可以提供总线错误10的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆