Cabal Update and Package Installation Errors
Asked Answered
A

2

7

When I do cabal install criterion

I get the following error regarding the package 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)

And when I run cabal update it again errors with

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

What is wrong?

I'm using Ubuntu 11.10 and GHC 7.0.4 from this PPA and my network connection is just fine in the rest of the system.

Amnesia answered 18/10, 2011 at 21:5 Comment(2)
Can you check your cabal config? In the file ~/.cabal/config, look for a line beginning with remote-repo:, it should be remote-repo: hackage.haskell.org:http://hackage.haskell.org/packages/archive.Poser
And then try ping'ing hackage.haskell.org to make sure it isn't a network issue.Eugenioeugenius
A
4

It was a proxy setting. It didn't suffice to unset ftp_proxy or http_proxy but also https_proxy. GNOME doesn't automatically remove terminal proxy configuraition when I disable it from system settings. Very annoying. I will write a shell-script that disables all proxy settings.

Sorry for bothering you all.

Amnesia answered 19/10, 2011 at 9:42 Comment(1)
Not a bother. you helped me because I did the same thing.Kamalakamaria
B
0

You may also force the proxy:

export http_proxy=hackage.haskell.org:80
cabal update
export http_proxy=
Bine answered 24/12, 2015 at 21:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.