# How to properly install the HSL.jl package?

**URL:** <https://discourse.julialang.org/t/how-to-properly-install-the-hsl-jl-package/106541>\
**Category:** General Usage\
**Tags:** package, installation\
**Created:** [November 21, 2023, 5:00pm UTC](https://discourse.julialang.org/t/how-to-properly-install-the-hsl-jl-package/106541 "2023-11-21T17:00:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hugo](https://avatars.discourse-cdn.com/v4/letter/h/b38774/32.png) [@Hugo](https://discourse.julialang.org/u/Hugo)\
**Post date:** [November 21, 2023, 5:00pm UTC](https://discourse.julialang.org/t/how-to-properly-install-the-hsl-jl-package/106541/1 "2023-11-21T17:00:16Z")

</div>

A few of the packages I use often have the package `HSL.jl` as a dependency. I have noticed that when I install packages that have such dependency, I get a message informing me that `HSL.jl` is not properly installed and I need to `Pkg.build()` it.

` Error: HSL library not properly installed. Please run Pkg.build("HSL")`

I have run `Pkg.build("HSL")`, but it doesn’t solve the problem. I have removed `HSL.jl` either by using `rm`, either by deleting its directory in the `.julia` folder, and re-installed it. Again, it was to no avail; I keep getting the same error message that says the package is not properly installed and I need to build it.

Has anyone deal with this issue? If so, what’s the solution you found?  
Thank you.

---

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [November 21, 2023, 5:57pm UTC](https://discourse.julialang.org/t/how-to-properly-install-the-hsl-jl-package/106541/2 "2023-11-21T17:57:58Z")

</div>

@amontoison is the HSL guru

---

<div class="post-metadata">

**Author:** ![amontoison](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/amontoison/32/218741_2.png) [@amontoison](https://discourse.julialang.org/u/amontoison)\
**Post date:** [November 21, 2023, 9:24pm UTC](https://discourse.julialang.org/t/how-to-properly-install-the-hsl-jl-package/106541/3 "2023-11-21T21:24:06Z")

</div>

Hi @Hugo!

You have an old version of `HSL.jl` (\< v0.4) where it was still necessary to compile HSL packages.  
With the latest releases (v 0.4.x), you can install [HSL.jl](https://github.com/JuliaSmoothOptimizers/HSL.jl) as any Julia package and request an academic license [here](https://licences.stfc.ac.uk/product/libhsl) to download and install `HSL_jll.jl`.  
`HSL_jll.jl` contains the precompiled shared library that contains C and Fortran routines that we can call in [HSL.jl](https://github.com/JuliaSmoothOptimizers/HSL.jl).  
I can help to update the packages that use [HSL.jl](https://github.com/JuliaSmoothOptimizers/HSL.jl) if it’s needed. 😃

---

<div class="post-metadata">

**Author:** ![Hugo](https://avatars.discourse-cdn.com/v4/letter/h/b38774/32.png) [@Hugo](https://discourse.julialang.org/u/Hugo)\
**Post date:** [November 22, 2023, 7:27pm UTC](https://discourse.julialang.org/t/how-to-properly-install-the-hsl-jl-package/106541/4 "2023-11-22T19:27:37Z")

</div>

Thank you for the clarification, @amontoison. I didn’t even know that `HSL.jl` requires a license. I’ll look into that.
