Skip to content

Instantly share code, notes, and snippets.

@jonatanrdsantos
Last active August 21, 2020 05:23
Show Gist options
  • Save jonatanrdsantos/673aa658e46a7342b154 to your computer and use it in GitHub Desktop.
Save jonatanrdsantos/673aa658e46a7342b154 to your computer and use it in GitHub Desktop.
curl port 443: Network is unreachable problem

How to solve the curl port 443: Network is unreachable problem:

joridos@localhost:~/Documents/github$ opam init
default    Downloading https://opam.ocaml.org/urls.txt
'opam init' failed.
# opam-version    1.1.1
# os              linux
Cannot download https://opam.ocaml.org/urls.txt, please check your connection settings.
joridos@localhost:~/Documents/github$ curl https://opam.ocaml.org/urls.txt
curl: (7) Failed to connect to opam.ocaml.org port 443: Network is unreachable

just do it:

echo ipv4 >> ~/.curlrc
@rjcrystal
Copy link

Thanks a lot man didn't knew it would be this simple 👍

@adiwids
Copy link

adiwids commented Jan 24, 2016

👍
It's working for me.
I had this unreachable issue when install composer.

Many thanks.

@rkkautsar
Copy link

👍
Thanks

@webdevcoderin
Copy link

Its not working in my case

@thanhleviet
Copy link

It works for me. Many thanks.

@spurdow
Copy link

spurdow commented Mar 6, 2016

Its not working for my case :'(

@dd1994
Copy link

dd1994 commented Mar 11, 2016

👍 works fun

@rolindroy
Copy link

rolindroy commented Jun 16, 2016

Cool. It works for me.

@hubert10
Copy link

Thanks,it worked for me.

@JohnnyXiao
Copy link

thanks

@deepakmadstech
Copy link

Thanks :)

@Parmarno
Copy link

thx work for me

@ad05bzag
Copy link

ad05bzag commented Oct 7, 2016

worked for me!

@joseluis
Copy link

Thank you!

@inlandfx
Copy link

inlandfx commented Dec 7, 2016

It worked but i don't know why forcing ipv4 is necessary to make it work

@samkeeleyong
Copy link

Thanks! it worked for me, but could you explain what the command does and how it solves the problem?

@varun054
Copy link

varun054 commented Feb 1, 2017

Its working for me. :)

Thanks dude.

@itbidhan
Copy link

nice trick echo ipv4 >> ~/.curlrc

@kumar88kanishk
Copy link

It worked for me but can someone explain this. What was causing the issue and how this solved it?

@vikaschauhan1
Copy link

great (y).

Thanks

@avitiw
Copy link

avitiw commented Jan 18, 2018

Thanks a lot. Saved my time. I was trying to install OCaml on Bash on Ubuntu on Windows. Got the error on Opam init.

Failed to connect to opam.ocaml.org port 443: Connection refused

Doing this resolved it.

@yanfeiyu
Copy link

Thanks a lot!!!Works for me as well!

@linuxguy27612
Copy link

Thanks very helpful

@ngovanduy
Copy link

Thanks you very much 👍

@00dimas
Copy link

00dimas commented Oct 8, 2018

Nice tricks thx a lot

@masayomitan
Copy link

doesnt work :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment