Reputation: 910
I access internet through a proxy and have appropriately set up the environment variables. The problem is that whenever I am trying to install any package through cabal, it fails with a
connect: does not exist (Connection Refused)
error.
But if I run cabal update -v3
, it successfully makes the connection and retrieves the update information.
$ cabal --version
cabal-install version 1.20.0.2
using version 1.20.0.1 of the Cabal library
Edit: I'm running Ubuntu 14.04.
Upvotes: 4
Views: 112
Reputation: 910
Okay. The problem is solved by using -E
with sudo
command.
sudo -E cabal install <package>
Although, I don't understand why cabal update
could work but not cabal install
.
Upvotes: 1