# Errors about adding LineSearch.jl

**URL:** https://discourse.julialang.org/t/errors-about-adding-linesearch-jl/133815
**Category:** General Usage
**Tags:** question, package
**Created:** [November 12, 2025, 4:56am UTC](https://discourse.julialang.org/t/errors-about-adding-linesearch-jl/133815 "2025-11-12T04:56:32Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![shatanzikou](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/shatanzikou/32/212877_2.png) [@shatanzikou](https://discourse.julialang.org/u/shatanzikou)
#### Post date: [November 12, 2025, 4:56am UTC](https://discourse.julialang.org/t/errors-about-adding-linesearch-jl/133815/1 "2025-11-12T04:56:32Z")

</div>

I use julia V1.12.1 to add LineSearch.jl with following code

```julia-auto
import Pkg

Pkg.add("LineSearch")

```

Then I received a error message, which is

```julia-auto
ERROR: Unsatisfiable requirements detected for package LinearAlgebra [37e2e46d]:
 LinearAlgebra [37e2e46d] log:
 ├─possible versions are: 1.9.0 or uninstalled (package in sysimage!)
 └─found to have no compatible versions left with LineSearch [87fe0de2]
   └─LineSearch [87fe0de2] log:
     ├─possible versions are: 0.1.0-0.1.4 or uninstalled
     └─restricted to versions * by an explicit requirement, leaving only versions: 0.1.0-0.1.4
Stacktrace:
  [1] propagate_constraints!(graph::Pkg.Resolve.Graph, sources::Set{Int64}; log_events::Bool)
    @ Pkg.Resolve E:\code and work\Julia-1.9.0-rc1\share\julia\stdlib\v1.9\Pkg\src\Resolve\graphtype.jl:1072
  [2] propagate_constraints! (repeats 2 times)
    @ E:\code and work\Julia-1.9.0-rc1\share\julia\stdlib\v1.9\Pkg\src\Resolve\graphtype.jl:1008 [inlined]
  [3] simplify_graph!(graph::Pkg.Resolve.Graph, sources::Set{Int64}; clean_graph::Bool)
    @ Pkg.Resolve E:\code and work\Julia-1.9.0-rc1\share\julia\stdlib\v1.9\Pkg\src\Resolve\graphtype.jl:1533
  [4] simplify_graph! (repeats 2 times)
    @ E:\code and work\Julia-1.9.0-rc1\share\julia\stdlib\v1.9\Pkg\src\Resolve\graphtype.jl:1532 [inlined]
  [5] resolve_versions!(env::Pkg.Types.EnvCache, registries::Vector{Pkg.Registry.RegistryInstance}, pkgs::Vector{Pkg.Types.PackageSpec}, julia_version::VersionNumber)
    @ Pkg.Operations E:\code and work\Julia-1.9.0-rc1\share\julia\stdlib\v1.9\Pkg\src\Operations.jl:398
  [6] targeted_resolve(env::Pkg.Types.EnvCache, registries::Vector{Pkg.Registry.RegistryInstance}, pkgs::Vector{Pkg.Types.PackageSpec}, preserve::Pkg.Types.PreserveLevel, julia_version::VersionNumber)
    @ Pkg.Operations E:\code and work\Julia-1.9.0-rc1\share\julia\stdlib\v1.9\Pkg\src\Operations.jl:1332
  [7] tiered_resolve(env::Pkg.Types.EnvCache, registries::Vector{Pkg.Registry.RegistryInstance}, pkgs::Vector{Pkg.Types.PackageSpec}, julia_version::VersionNumber)
    @ Pkg.Operations E:\code and work\Julia-1.9.0-rc1\share\julia\stdlib\v1.9\Pkg\src\Operations.jl:1321
  [8] _resolve(io::Base.TTY, env::Pkg.Types.EnvCache, registries::Vector{Pkg.Registry.RegistryInstance}, pkgs::Vector{Pkg.Types.PackageSpec}, preserve::Pkg.Types.PreserveLevel, julia_version::VersionNumber)
    @ Pkg.Operations E:\code and work\Julia-1.9.0-rc1\share\julia\stdlib\v1.9\Pkg\src\Operations.jl:1338
  [9] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, new_git::Set{Base.UUID}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform)
    @ Pkg.Operations E:\code and work\Julia-1.9.0-rc1\share\julia\stdlib\v1.9\Pkg\src\Operations.jl:1354
 [10] add
    @ E:\code and work\Julia-1.9.0-rc1\share\julia\stdlib\v1.9\Pkg\src\Operations.jl:1343 [inlined]
 [11] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, kwargs::Base.Pairs{Symbol, Base.TTY, Tuple{Symbol}, NamedTuple{(:io,), Tuple{Base.TTY}}})
    @ Pkg.API E:\code and work\Julia-1.9.0-rc1\share\julia\stdlib\v1.9\Pkg\src\API.jl:275
 [12] add(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Pkg.API E:\code and work\Julia-1.9.0-rc1\share\julia\stdlib\v1.9\Pkg\src\API.jl:156
 [13] add(pkgs::Vector{Pkg.Types.PackageSpec})
    @ Pkg.API E:\code and work\Julia-1.9.0-rc1\share\julia\stdlib\v1.9\Pkg\src\API.jl:145
 [14] #add#25
    @ E:\code and work\Julia-1.9.0-rc1\share\julia\stdlib\v1.9\Pkg\src\API.jl:144 [inlined]
 [15] add
    @ E:\code and work\Julia-1.9.0-rc1\share\julia\stdlib\v1.9\Pkg\src\API.jl:144 [inlined]
 [16] #add#24
    @ E:\code and work\Julia-1.9.0-rc1\share\julia\stdlib\v1.9\Pkg\src\API.jl:143 [inlined]
 [17] add(pkg::String)
    @ Pkg.API E:\code and work\Julia-1.9.0-rc1\share\julia\stdlib\v1.9\Pkg\src\API.jl:143
 [18] top-level scope
    @ d:\.waterproof\high density\load.jl:17

```

I have updated the registry, delete the LinearAlgebra at current enviorment and global environment.  
Here are packages I installed in current environment

```julia-auto
  [5a033b19] CurveFit v0.6.1
  [8bb1440f] DelimitedFiles v1.9.1
⌅ [0c46a032] DifferentialEquations v7.13.0
⌅ [8913a72c] NonlinearSolve v3.4.0
  [d96e819e] Parameters v0.12.3
  [1fd47b50] QuadGK v2.11.2
  [f2b01f46] Roots v2.2.10
⌅ [727e6d20] SimpleNonlinearSolve v1.4.0
⌅ [c3572dad] Sundials v4.24.0
  [3a884ed6] UnPack v1.0.2
Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated`

```

---

<div class="post-metadata">

### Author: ![technocrat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/technocrat/32/220947_2.png) [@technocrat](https://discourse.julialang.org/u/technocrat)
#### Post date: [November 12, 2025, 5:20am UTC](https://discourse.julialang.org/t/errors-about-adding-linesearch-jl/133815/2 "2025-11-12T05:20:58Z")

</div>

I added it in a project environment without LinearAlgebra

```julia-auto

julia> Pkg.add("LineSearch")
    Updating registry at `~/.julia/registries/General.toml`
   Resolving package versions...
   Installed SciMLLogging ────────────── v1.5.0
   Installed MaybeInplace ────────────── v0.1.4
   Installed SciMLJacobianOperators ──── v0.1.11
   Installed FunctionWrappers ────────── v1.1.3
   Installed ADTypes ─────────────────── v1.18.0
   Installed LineSearch ──────────────── v0.1.4
   Installed RecursiveArrayTools ─────── v3.36.0
   Installed SciMLBase ───────────────── v2.124.0
   Installed FunctionWrappersWrappers ── v0.1.3
   Installed SciMLStructures ─────────── v1.7.0
   Installed SciMLOperators ──────────── v1.10.0
   Installed RuntimeGeneratedFunctions ─ v0.5.16
   Installed Jieko ───────────────────── v0.2.1
   Installed PreallocationTools ──────── v0.4.34
   Installed DifferentiationInterface ── v0.7.11
   Installed Moshi ───────────────────── v0.3.7
   Installed ConcreteStructs ─────────── v0.2.3
   Installed SymbolicIndexingInterface ─ v0.3.46
    Updating `~/.julia/environments/v1.12/Project.toml`
  [87fe0de2] + LineSearch v0.1.4
    Updating `~/.julia/environments/v1.12/Manifest.toml`
  [47edcb42] + ADTypes v1.18.0
  [4fba245c] + ArrayInterface v7.22.0
  [2569d6c7] + ConcreteStructs v0.2.3
  [a0c0ee7d] + DifferentiationInterface v0.7.11
  [e2ba6199] + ExprTools v0.1.10
  [9aa1b823] + FastClosures v0.3.2
  [069b7b12] + FunctionWrappers v1.1.3
  [77dc65aa] + FunctionWrappersWrappers v0.1.3
  [ae98c720] + Jieko v0.2.1
  [87fe0de2] + LineSearch v0.1.4
  [bb5d69b7] + MaybeInplace v0.1.4
  [2e0e35c7] + Moshi v0.3.7
  [d236fae5] + PreallocationTools v0.4.34
⌃ [731186ca] + RecursiveArrayTools v3.36.0
  [7e49a35a] + RuntimeGeneratedFunctions v0.5.16
  [0bca4576] + SciMLBase v2.124.0
  [19f34311] + SciMLJacobianOperators v0.1.11
  [a6db7da4] + SciMLLogging v1.5.0
  [c0aeaf25] + SciMLOperators v1.10.0
  [431bcebd] + SciMLPublic v1.0.0
  [53ae85a6] + SciMLStructures v1.7.0
  [2efcf032] + SymbolicIndexingInterface v0.3.46
        Info Packages marked with ⌃ have new versions available and may be upgradable.
Precompiling packages finished.
  42 dependencies successfully precompiled in 17 seconds. 528 already precompiled.

```

and then I added `LinearAlegbra`.

So, in a local environment under Julia 1.12.1, LineSearch 0.1.4 and LinearAlgebra 1.12.0 don’t conflict. But you seem to be under `Julia-1.9.0-rc1`

---

<div class="post-metadata">

### Author: ![baggepinnen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/baggepinnen/32/693_2.png) [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)
#### Post date: [November 12, 2025, 6:18am UTC](https://discourse.julialang.org/t/errors-about-adding-linesearch-jl/133815/3 "2025-11-12T06:18:53Z")

</div>

> [@shatanzikou](#):
>
> `(package in sysimage!)`

This is probably the issue, you’re using a system image with some package versions locked in?

---

<div class="post-metadata">

### Author: ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)
#### Post date: [November 12, 2025, 6:59am UTC](https://discourse.julialang.org/t/errors-about-adding-linesearch-jl/133815/4 "2025-11-12T06:59:21Z")

</div>

> [@shatanzikou](#):
>
> I use julia V1.12.1 to add [LineSearch.jl](https://juliaregistries.github.io/General/packages/redirect_to_repo/LineSearch) with following code

There are some distractions here but the primary issue is that there is no registered version of `LineSearch` with Julia compat less than 1.10 and you are in fact not running 1.12.1 but 1.9.0-rc1, as is very clear from the stacktrace:

> ```julia-auto
> [1] propagate_constraints!(graph::Pkg.Resolve.Graph, sources::Set{Int64}; log_events::Bool)
> @ Pkg.Resolve E:\code and work\Julia-1.9.0-rc1\share\julia\stdlib\v1.9\Pkg\src\Resolve\graphtype.jl:1072
> 
> ```

---

<div class="post-metadata">

### Author: ![shatanzikou](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/shatanzikou/32/212877_2.png) [@shatanzikou](https://discourse.julialang.org/u/shatanzikou)
#### Post date: [November 12, 2025, 12:53pm UTC](https://discourse.julialang.org/t/errors-about-adding-linesearch-jl/133815/5 "2025-11-12T12:53:03Z")

</div>

It seems that there is still a old julia version in my computer, and vscode connects to the path of it. After I deleted it and change executable path to the new one, the error was fixed.
