【问题标题】:Cabal Update and Package Installation ErrorsCabal 更新和软件包安装错误
【发布时间】:2011-12-10 10:53:10
【问题描述】:

当我做cabal install criterion

我收到关于包裹vector-algorithms的以下错误

Warning: The package list for 'hackage.haskell.org' is 16 days old.
Run 'cabal update' to get the latest list of available packages.
Resolving dependencies...
Downloading vector-algorithms-0.4...
cabal: Error: some packages failed to install:
vector-algorithms-0.4 failed while downloading the package. The exception was:
connect: does not exist (Connection refused)

当我运行 cabal update 时,它再次出现错误

Downloading the latest package list from hackage.haskell.org
cabal: openTCPConnection: host lookup failure for ""

怎么了?

我正在使用来自this PPA 的 Ubuntu 11.10 和 GHC 7.0.4,并且我的网络连接在系统的其余部分都很好。

【问题讨论】:

  • 你能检查你的阴谋集团配置吗?在文件~/.cabal/config中,查找以remote-repo:开头的行,应该是remote-repo: hackage.haskell.org:http://hackage.haskell.org/packages/archive
  • 然后尝试ping hackage.haskell.org 以确保它不是网络问题。

标签: haskell ghc cabal cabal-install


【解决方案1】:

这是一个代理设置。取消设置 ftp_proxyhttp_proxy 以及 https_proxy 是不够的。当我从系统设置中禁用终端代理配置时,GNOME 不会自动删除它。很烦人。我将编写一个 禁用所有代理设置的 shell 脚本。

打扰了大家。

【讨论】:

  • 不麻烦。你帮助了我,因为我做了同样的事情。
【解决方案2】:

你也可以强制代理:

export http_proxy=hackage.haskell.org:80
cabal update
export http_proxy=

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-12-14
    • 2022-01-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-12-13
    相关资源
    最近更新 更多