How do I get Cabal to bypass my Windows proxy settings? - haskell

When retrieving packages with Cabal, I frequently get errors with this message:
user error (Codec.Compression.Zlib:
premature end of compressed stream)
It looks like Cabal is using my Windows Networking proxy settings (for Privoxy).
From digging around Google, Cabal or its libraries appear to have (had) a problem
in this area.
Possible solutions I can see are:
Turn off proxying while using Cabal (not very keen on this one); or
Get a patch and start hacking. I'm hesitant to go down this path,
as I'm a complete Haskell noob and I'm not yet comfortable with Darcs; or
Give it the magic "can I haz no proxy" parameter. Hence the question.

If I'm reading http://darcs.haskell.org/cabal-install/Distribution/Client/HttpUtils.hs correctly, you should be able to set the environment variable HTTP_PROXY to an invalid value (would "" work?) to get it to go direct.

Following #SamB's advice, and experimenting a bit, the solution I am now using is:
export HTTP_PROXY="::"
Here's part of the experimental log:
Try #SamB's solution:
[12:10:35z ~]:export HTTP_PROXY=""
[12:11:47z ~]:set|grep HTTP
HTTP_PROXY=
[12:11:50z ~]:cabal update
Downloading the latest package list from hackage.haskell.org
cabal.exe: connect: failed (Connection refused (WSAECONNREFUSED))
Try a "reasonable person's" solution:
[12:11:54z ~]:export HTTP_PROXY="None"
[12:12:02z ~]:set|grep HTTP
HTTP_PROXY=None
[12:12:04z ~]:cabal update
Downloading the latest package list from hackage.haskell.org
cabal.exe: user error [\]
(openTCPConnection: host lookup failure for "None")
Try an "unreasonable person's" solution:
[12:23:44z ~]:export HTTP_PROXY="::"
[12:24:00z ~]:set|grep HTTP
HTTP_PROXY=::
[12:24:04z ~]:cabal update
Downloading the latest package list from hackage.haskell.org
Warning: invalid http proxy uri: "::"
Warning: proxy uri must be http with a hostname
Warning: ignoring http proxy, trying a direct connection
Note: there is a new version of cabal-install available.
To upgrade, run: cabal install cabal-install
[12:24:34z ~]:
Yay!

Related

Weird error while installing OSPD (OpenVAS)

Im trying to compile all necesary modules in order to setup an OpenVAS local server, when I try to install OSPD module I get an error. I have already read the read info at their github page and installed all necesary packages, but I keep getting the same error when I try:
root#debian-server:/home/openvas/ospd-master# python3 setup.py install
..........................................................
Copying ospd-21.10.0.dev1-py3.7.egg to /usr/local/lib/python3.7/dist-packages
ospd 21.10.0.dev1 is already the active version in easy-install.pth
Installed /usr/local/lib/python3.7/dist-packages/ospd-21.10.0.dev1-py3.7.egg
Processing dependencies for ospd==21.10.0.dev1
Searching for deprecated
Reading https://pypi.org/simple/deprecated/
Download error on https://pypi.org/simple/deprecated/: [Errno 101] Network is unreachable -- Some packages may not be found!
Couldn't find index page for 'deprecated' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.org/simple/
Download error on https://pypi.org/simple/: [Errno 101] Network is unreachable -- Some packages may not be found!
No local packages or working download links found for deprecated
error: Could not find suitable distribution for Requirement.parse('deprecated')
What do I need to do for be able to install it (I dont wanna install it trough pip)
Note: I only copy the error section in order to keep clean this page...
Well, apparantly was a self mistake due to a missconfiguration on proxy enviromentals varibles. Apparently pip works over https and I had a missconfiguration

Node Sass error in Angular: Mixins may not be defined within control directives or other mixins

I have a project written in Angular 4 and I am trying to build it, but I keep getting this error: Mixins may not be defined within control directives or other mixins.
I've looked around on the internet and I saw some recommendations to downgrade node-sass to the version 4.8.1, but when I tried to do this, I got a 404 erro from Github:
> node-sass#4.8.1 install c:\my-project\node_modules\node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.8.1/win32-x64-64_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.8.1/win32-x64-64_binding.node":
HTTP error 404 Not Found
And sure enough, this address: https://github.com/sass/node-sass/releases/download/v4.8.1/win32-x64-64_binding.node doesn't exists. My guess is because there are new versions of node-sass available and the 4.8.1 was pushed back to the second page: https://github.com/sass/node-sass/releases?after=3.5.3.
I know that I am using a very old version of Angular and I have plans to upgrade it, but I don't have the time to do this now, has someone managed to solve this?
Download win32-x64-64_binding.node, put in the local:
C:\Users\{username}\AppData\Roaming\npm-cache\node-sass\4.8.1\
Then install again.

Cabal update fails with 404 error trying to access a non existing file when compiling Apache Thrift

I'm trying to install Apache Thrift on my system, which performs a cabal update command. This command fails with the following message:
Downloading the latest package list from stackage cabal: Failed to download
http://www.stackage.org/stackage/7ae494fec2db3161dfb8e64677149285857478e0/00-index.tar.gz
: ErrorMisc "Error HTTP code: 404"
I normally use stack and I never had to do a cabal update manually. I don't know if the interaction between cabal and stack is a problem here.
Any ideas on how to fix this?
EDIT: Looking at my `~/.cabal/config~ I see the following entry:
remote-repo: stackage:http://www.stackage.org/stackage/7ae494fec2db3161dfb8e64677149285857478e0
So it seems that line is the culprit, but I don't know whether stack could have changed this for a good reason.

EclipseFP - configuring because setup_config not present

I have installed Haskell platform and I wanted to also install EclipseFP. I followed some instructions online and I thought it was done, but when I type any character i get the following message:
configuring because setup_config not present
Resolving dependencies...
Configuring proj1-0.1...
I have no idea what I must do now, but I hope somebody does.

How to add an accounts-password package?

My platform is windows 7.I want to add the accounts-password package. But I got a "error:CERT_UNTRUSTED".
This is all output error message.
AppData\Local.meteor\leaderboard>..\meteor add accounts-password
Unable to update package catalog (are you offline?)
If you are using Meteor behind a proxy, set HTTP_PROXY and HTTPS_PROXY
environment variables or see this page for more details:
https://github.com/meteor/meteor/wiki/Using-Meteor-behind-a-proxy
=> Errors while adding packages:
While downloading npm-bcrypt#0.7.8_2...: error: CERT_UNTRUSTED
Your package catalog may be out of date. Please connect to the
internet and try again.
Blockquote
I don't know how to fix this problem. Or is there a alternative manual way to add this accounts-password package. Have any suggestions? Many thanks.
You have a space in "pa ssword".
Run:
meteor add accounts-password
You'll be good to go.
It looks like you are behind the firewall which is conducting SSL Inspection (so it is replacing SSL certificate). If it is so - ask your system administrator to turn off SSL Inspection for your machine and try again.

Resources