# Updating haxelib from 4.0.2 to 4.0.3 on Windows

**URL:** <https://community.haxe.org/t/updating-haxelib-from-4-0-2-to-4-0-3-on-windows/3917>\
**Category:** Haxe\
**Tags:** haxelib-support\
**Created:** [March 30, 2023, 11:57pm UTC](https://community.haxe.org/t/updating-haxelib-from-4-0-2-to-4-0-3-on-windows/3917 "2023-03-30T23:57:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![miriti](https://community.haxe.org/user_avatar/community.haxe.org/miriti/32/1342_2.png) [@miriti](https://community.haxe.org/u/miriti)\
**Post date:** [March 30, 2023, 11:57pm UTC](https://community.haxe.org/t/updating-haxelib-from-4-0-2-to-4-0-3-on-windows/3917/1 "2023-03-30T23:57:20Z")

</div>

So I’ve got a fresh Windows 10 install. I’ve downloaded the latest haxe binaries pack from the website and learned that haxelib 4.0.2 is broken (any attempt to install anything results in `Error: Failed with error: X509 - Certificate verification failed, e.g. CRL, CA or signature check failed `). My understanding is that this issue was fixed in 4.0.3 but how can I update the version? I couldn’t find the new binaries anywhere. I see there is a `haxelib` haxelib but I can’t use haxelib to update haxelib due to the mentioned error. I downloaded the zip file from the haxelib page but it only contains Neko bytecode binary (run.n) and the source code. So what can I do in order to get the Windows binary? Build it from the source code? Or maybe I just missed the link to the latest build?

---

<div class="post-metadata">

**Author:** ![tobil4sk](https://community.haxe.org/user_avatar/community.haxe.org/tobil4sk/32/1458_2.png) [@tobil4sk](https://community.haxe.org/u/tobil4sk)\
**Post date:** [March 31, 2023, 12:06am UTC](https://community.haxe.org/t/updating-haxelib-from-4-0-2-to-4-0-3-on-windows/3917/2 "2023-03-31T00:06:41Z")

</div>

You should be able to install the local zip file using:

```sh
haxelib install package.zip

```

Then whenever you call the system installed haxelib, it will redirect to the updated version.

However, this looks like a neko problem, so updating Haxelib is unlikely to change anything. This looks like this problem:

> <https://github.com/HaxeFoundation/neko/issues/196>
>
> Doing \`haxelib install jQueryExtern\` in a clean Windows container results in err…or as follows:
> 
> \`\`\`
> Error: X509 - Certificate verification failed, e.g. CRL, CA or signature check failed |  
> \-- | --
>   |   |  
>   | Called from haxe/remoting/HttpConnection.hx line 63 |  
>   | Called from C:\\projects\\haxe\\std/sys/Http.hx line 58 |  
>   | Called from C:\\projects\\haxe\\std/sys/Http.hx line 245 |  
>   | Called from C:\\projects\\haxe\\std/sys/Http.hx line 60 |  
>   | Called from haxe/remoting/HttpConnection.hx line 64 |  
>   | Called from haxelib/client/Main.hx line 51 |  
>   | Called from haxelib/client/Main.hx line 721 |  
>   | Called from haxelib/client/Main.hx line 470
> \`\`\`
> 
> See:
> https://github.com/docker-library/official-images/pull/6281#issuecomment-511055993
> https://bugs.python.org/issue36011

---

<div class="post-metadata">

**Author:** ![miriti](https://community.haxe.org/user_avatar/community.haxe.org/miriti/32/1342_2.png) [@miriti](https://community.haxe.org/u/miriti)\
**Post date:** [March 31, 2023, 12:15am UTC](https://community.haxe.org/t/updating-haxelib-from-4-0-2-to-4-0-3-on-windows/3917/3 "2023-03-31T00:15:13Z")

</div>

Hm. So what do people do in order to make it work on windows? Or does it fail only for some users? Maybe I can build it from source code with hxcpp or hashlink? That would work for me.

---

<div class="post-metadata">

**Author:** ![tobil4sk](https://community.haxe.org/user_avatar/community.haxe.org/tobil4sk/32/1458_2.png) [@tobil4sk](https://community.haxe.org/u/tobil4sk)\
**Post date:** [March 31, 2023, 6:04pm UTC](https://community.haxe.org/t/updating-haxelib-from-4-0-2-to-4-0-3-on-windows/3917/4 "2023-03-31T18:04:55Z")

</div>

According to the linked issue, it would seem that downloading from [lib.haxe.org](http://lib.haxe.org) using something like curl might download the certificates and might prevent future certificate issues for haxelib? So might be worth trying something like:  
`curl -sSLf https://lib.haxe.org/p/haxelib/4.0.3/download -o haxelib.zip`  
See:  
["Error: X509 - Certificate verification failed" in a clean Windows environment · Issue #196 · HaxeFoundation/neko · GitHub](https://github.com/HaxeFoundation/neko/issues/196#issuecomment-708047282)

I’m not too sure how people fix this issue, since I’ve used Haxelib on Windows for a while with no issues, possibly because it was never on a completely fresh installation. I think sometimes people get one-off failures like this and they go away after a while.

There is also this OpenFL post about a similar issue on Mac:

> **[Getting certification error using haxelib on mac](https://community.openfl.org/t/getting-certification-error-using-haxelib-on-mac/13489)**
>
> I have used haxelib before without problems. But now using it is showing the following error haxelib search openfl Error: Failed with error: X509 - Certificate verification failed, e.g. CRL, CA or signature check failed So how to solve it?

> Maybe I can build it from source code with hxcpp or hashlink?

Currently, the haxelib git repo doesn’t have a configuration for building with hxcpp/hl, but it might not be too hard to try this. Although, neko, hxcpp, and hashlink all use mbedtls so I’m not sure how likely it is to make a difference.

---

<div class="post-metadata">

**Author:** ![miriti](https://community.haxe.org/user_avatar/community.haxe.org/miriti/32/1342_2.png) [@miriti](https://community.haxe.org/u/miriti)\
**Post date:** [April 2, 2023, 3:07pm UTC](https://community.haxe.org/t/updating-haxelib-from-4-0-2-to-4-0-3-on-windows/3917/5 "2023-04-02T15:07:30Z")

</div>

Ok, simply downloading something from haxelib using curl did the trick. I think it’s a good enough solution for me right now. Thank you!
