cabal + proxy:从hackage下载包

时间:2015-09-07 11:14:14

标签: windows haskell cabal

我在Windows上使用Haskell Platform 7.10.2-a(64位):

>cabal -V
cabal-install version 1.22.6.0
using version 1.22.4.0 of the Cabal library

我的代理需要(基本HTTP)身份验证:

>set http_proxy=http://user:passwd@acme.com:port

它似乎适用于cabal update

> cabal update
Downloading the latest package list from hackage.haskell.org
Skipping download: Local and remote files match.

但是,当我尝试安装任何软件包时,它会失败:

> cabal get ghc-mod
Warning: The package list for 'hackage.haskell.org' does not exist. Run 'cabal
update' to download it.
cabal: There is no package named 'ghc-mod'.

>cabal install shelltestrunner
Warning: The package list for 'hackage.haskell.org' does not exist. Run 'cabal
update' to download it.
cabal: There is no package named 'shelltestrunner'.
You may need to run 'cabal update' to get the latest list of available
packages.

如何让getinstall实际使用代理?或者还有其他问题阻止从hackage安装软件包吗?

1 个答案:

答案 0 :(得分:0)

我可能找到原因,在使用\\ACME.NET\UserData\username\RF\AppData\Roaming\cabal\packages\hackage.haskell.org\00-index.tar.gz时,它会显示

之类的路径

C:\Users\username\AppData\..

而cabal的其他用途使用RF之类的路径,但在显示的路径中没有 remote-repo-cache文件夹。必须是我公司的网络服务器配置。无论如何,我更新了cabal/config之类的路径以使用web.config中的其他文件夹,现在效果更好。