Package update issue

Today I tried to update julia packages and got the following output. It first threw an error for Clp. I removed Clp then CPLEX got downgraded to 0.3.3 along side an error message “Is_apple not defined”. I tried to upgrade CPLEX to v0.5 but failed. Tried to upgrade Jump to 0.20 (one other post mentioned this) but no success. Tried to add Clp but failed.

(v1.1) pkg> st
    Status `C:\Users\Himanshi\.julia\environments\v1.1\Project.toml`
  [c52e3926] Atom v0.9.1
  [6e4b80f9] BenchmarkTools v0.4.2
  [a076750e] CPLEX v0.5.0
  [336ed68f] CSV v0.5.11
  [49dc2e85] Calculus v0.5.0
  [324d7699] CategoricalArrays v0.5.5
  [9961bab8] Cbc v0.6.0
  [e2554f3b] Clp v0.6.2
  [944b1d66] CodecZlib v0.6.0
  [a93c6f00] DataFrames v0.19.2
  [1313f7d8] DataFramesMeta v0.5.0
  [864edb3b] DataStructures v0.17.0
  [e7dc6d0d] DataValues v0.4.12
  [7806a523] DecisionTree v0.8.3
  [39dd38d3] Dierckx v0.4.1
  [0c46a032] DifferentialEquations v6.6.0
  [31c24e10] Distributions v0.21.1
  [f6369f11] ForwardDiff v0.10.3
  [38e38edf] GLM v1.3.1
  [60bf3e95] GLPK v0.11.0
  [28b8d3ca] GR v0.41.0
  [09f84164] HypothesisTests v0.8.0
  [7073ff75] IJulia v1.19.0
  [b6b21f68] Ipopt v0.6.0
  [8c755ed3] JuML v0.0.0 [`C:\Users\Himanshi\.julia\dev\JuML`]
  [4076af6c] JuMP v0.19.2 [`C:\Users\Himanshi\.julia\dev\JuMP`]
  [e5e0dc1b] Juno v0.7.2
  [5ab0869b] KernelDensity v0.5.1
  [b964fa9f] LaTeXStrings v1.0.3
  [50d2b5c4] Lazy v0.13.2
  [093fc24a] LightGraphs v1.3.0
  [2fda8390] LsqFit v0.8.1
  [33e6dc65] MKL v0.0.0 #master (https://github.com/JuliaComputing/MKL.jl)
  [cc2ba9b6] MLDataUtils v0.5.0
  [1914dd2f] MacroTools v0.5.1
  [b8f27783] MathOptInterface v0.9.1
  [2774e3e8] NLsolve v4.1.0
  [429524aa] Optim v0.19.2
  [9b87118b] PackageCompiler v0.6.4+ #sd-notomls (https://github.com/JuliaLang/PackageCompiler.jl.git)
  [ce6b1742] RDatasets v0.6.1
  [295af30f] Revise v2.1.8
  [3646fa90] ScikitLearn v0.5.1
  [90137ffa] StaticArrays v0.11.0
  [2913bbd2] StatsBase v0.32.0
  [f3b207a7] StatsPlots v0.11.0
  [70df011a] TableReader v0.4.0
  [bd369af6] Tables v0.2.11
  [c17dfb99] WinRPM v0.4.2
  [c2297ded] ZMQ v1.0.0
  [ade2ca70] Dates
  [8bb1440f] DelimitedFiles
  [8ba89e20] Distributed
  [de0858da] Printf
  [9a3f8284] Random
  [2f01184e] SparseArrays
  [10745b16] Statistics
  [8dfed614] Test

(v1.1) pkg> up
  Updating registry at `C:\Users\Himanshi\.julia\registries\General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
  Updating git-repo `https://github.com/JuliaComputing/MKL.jl`
  Updating git-repo `https://github.com/JuliaLang/PackageCompiler.jl.git`
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package Clp [e2554f3b]:
 Clp [e2554f3b] log:
 ├─possible versions are: [0.0.5-0.0.10, 0.1.0-0.1.1, 0.2.0-0.2.2, 0.3.0-0.3.1, 0.4.0, 0.5.0-0.5.1, 0.6.0-0.6.2] or uninstalled
 ├─restricted to versions * by an explicit requirement, leaving only versions [0.0.5-0.0.10, 0.1.0-0.1.1, 0.2.0-0.2.2, 0.3.0-0.3.1, 0.4.0, 0.5.0-0.5.1, 0.6.0-0.6.2]
 ├─restricted by julia compatibility requirements to versions: [0.5.0-0.5.1, 0.6.0-0.6.2] or uninstalled, leaving only versions: [0.5.0-0.5.1, 0.6.0-0.6.2]
 └─restricted by compatibility requirements with LinQuadOptInterface [f8899e07] to versions: [0.0.5-0.0.10, 0.1.0-0.1.1, 0.2.0-0.2.2, 0.3.0-0.3.1, 0.4.0] or uninstalled — no versions left
   └─LinQuadOptInterface [f8899e07] log:
     ├─possible versions are: [0.1.0, 0.2.0, 0.3.0-0.3.1, 0.4.0-0.4.3, 0.5.0, 0.6.0] or uninstalled
     └─restricted by compatibility requirements with MathOptInterface [b8f27783] to versions: uninstalled
       └─MathOptInterface [b8f27783] log:
         ├─possible versions are: [0.1.0, 0.2.0, 0.3.0, 0.4.0-0.4.1, 0.5.0-0.5.1, 0.6.0-0.6.4, 0.7.0, 0.8.0-0.8.4, 0.9.0-0.9.1] or uninstalled
         └─restricted to versions 0.9.1-0.9 by JuMP [4076af6c], leaving only versions 0.9.1
           └─JuMP [4076af6c] log:
             ├─possible versions are: 0.19.2 or uninstalled
             └─JuMP [4076af6c] is fixed to version 0.19.2

(v1.1) pkg> rm Clp
  Updating `C:\Users\Himanshi\.julia\environments\v1.1\Project.toml`
  [e2554f3b] - Clp v0.6.2
  Updating `C:\Users\Himanshi\.julia\environments\v1.1\Manifest.toml`
  [e2554f3b] - Clp v0.6.2

(v1.1) pkg> gc
    Active manifests:
        `C:\Users\Himanshi\.julia\packages\PackageCompiler\CJQcs\packages\CSV\Manifest.toml`
        `C:\Users\Himanshi\.julia\packages\PackageCompiler\CJQcs\packages\DataFrames\Manifest.toml`
        `C:\Users\Himanshi\.julia\packages\PackageCompiler\CJQcs\packages\DecisionTree\Manifest.toml`
        `C:\Users\Himanshi\.julia\packages\PackageCompiler\CJQcs\packages\GR\Manifest.toml`
        `C:\Users\Himanshi\.julia\packages\PackageCompiler\CJQcs\packages\StatsBase\Manifest.toml`
        `C:\Users\Himanshi\.julia\packages\PackageCompiler\CJQcs\packages\DataFramesMeta\Manifest.toml`
        `C:\Users\Himanshi\.julia\packages\PackageCompiler\CJQcs\packages\GLM\Manifest.toml`
        `C:\Users\Himanshi\.julia\packages\PackageCompiler\CJQcs\packages\Manifest.toml`
        `C:\Users\Himanshi\.julia\packages\PackageCompiler\CJQcs\packages\StatsPlots\Manifest.toml`
        `C:\Users\Himanshi\.julia\environments\v1.1\Manifest.toml`
   Deleted `C:\Users\Himanshi\.julia\packages\Clp\IBQzB` (88.785 MiB)
   Deleted 1 package installation (88.785 MiB)

(v1.1) pkg> up
  Updating registry at `C:\Users\Himanshi\.julia\registries\General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
  Updating git-repo `https://github.com/JuliaComputing/MKL.jl`
  Updating git-repo `https://github.com/JuliaLang/PackageCompiler.jl.git`
 Resolving package versions...
 Installed CodeTracking ─── v0.5.8
 Installed JuliaFormatter ─ v0.1.5
 Installed IJulia ───────── v1.20.0
 Installed CPLEX ────────── v0.3.3
 Installed Cbc ──────────── v0.6.4
 Installed DataFrames ───── v0.19.3
  Updating `C:\Users\Himanshi\.julia\environments\v1.1\Project.toml`
  [a076750e] ↓ CPLEX v0.5.0 ⇒ v0.3.3
  [9961bab8] ↑ Cbc v0.6.0 ⇒ v0.6.4
  [a93c6f00] ↑ DataFrames v0.19.2 ⇒ v0.19.3
  [7073ff75] ↑ IJulia v1.19.0 ⇒ v1.20.0
  Updating `C:\Users\Himanshi\.julia\environments\v1.1\Manifest.toml`
  [a076750e] ↓ CPLEX v0.5.0 ⇒ v0.3.3
  [9961bab8] ↑ Cbc v0.6.0 ⇒ v0.6.4
  [da1fd8a2] ↑ CodeTracking v0.5.7 ⇒ v0.5.8
  [a93c6f00] ↑ DataFrames v0.19.2 ⇒ v0.19.3
  [7073ff75] ↑ IJulia v1.19.0 ⇒ v1.20.0
  [98e50ef6] ↑ JuliaFormatter v0.1.4 ⇒ v0.1.5
  [f8899e07] - LinQuadOptInterface v0.6.0
  Building CPLEX ─→ `C:\Users\Himanshi\.julia\packages\CPLEX\FUtHu\deps\build.log`
┌ Error: Error building `CPLEX`:
│ ERROR: LoadError: UndefVarError: is_apple not defined
│ Stacktrace:
│  [1] top-level scope at none:0
│  [2] include at .\boot.jl:326 [inlined]
│  [3] include_relative(::Module, ::String) at .\loading.jl:1038
│  [4] include(::Module, ::String) at .\sysimg.jl:29
│  [5] include(::String) at .\client.jl:403
│  [6] top-level scope at none:0
│ in expression starting at C:\Users\Himanshi\.julia\packages\CPLEX\FUtHu\deps\build.jl:18
└ @ Pkg.Operations C:\Users\Himanshi\AppData\Local\Julia-1.1.1\share\julia\stdlib\v1.1\Pkg\src\Operations.jl:1075
  Building IJulia → `C:\Users\Himanshi\.julia\packages\IJulia\fRegO\deps\build.log`
  Building Cbc ───→ `C:\Users\Himanshi\.julia\packages\Cbc\8nwnT\deps\build.log`

(v1.1) pkg> up CPLEX@0.5.0
  Updating registry at `C:\Users\Himanshi\.julia\registries\General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
 Resolving package versions...
  Updating `C:\Users\Himanshi\.julia\environments\v1.1\Project.toml`
 [no changes]
  Updating `C:\Users\Himanshi\.julia\environments\v1.1\Manifest.toml`
 [no changes]

(v1.1) pkg> rm CPLEX
  Updating `C:\Users\Himanshi\.julia\environments\v1.1\Project.toml`
  [a076750e] - CPLEX v0.3.3
  Updating `C:\Users\Himanshi\.julia\environments\v1.1\Manifest.toml`
  [a076750e] - CPLEX v0.3.3

(v1.1) pkg> add CPLEX@0.5.0
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package LinQuadOptInterface [f8899e07]:
 LinQuadOptInterface [f8899e07] log:
 ├─possible versions are: [0.1.0, 0.2.0, 0.3.0-0.3.1, 0.4.0-0.4.3, 0.5.0, 0.6.0] or uninstalled
 ├─restricted by compatibility requirements with CPLEX [a076750e] to versions: 0.6.0
 │ └─CPLEX [a076750e] log:
 │   ├─possible versions are: [0.0.3-0.0.19, 0.1.0-0.1.7, 0.2.0-0.2.8, 0.3.0-0.3.3, 0.4.0-0.4.4, 0.5.0] or uninstalled
 │   └─restricted to versions 0.5.0 by an explicit requirement, leaving only versions 0.5.0
 └─restricted by compatibility requirements with MathOptInterface [b8f27783] to versions: uninstalled — no versions left
   └─MathOptInterface [b8f27783] log:
     ├─possible versions are: [0.1.0, 0.2.0, 0.3.0, 0.4.0-0.4.1, 0.5.0-0.5.1, 0.6.0-0.6.4, 0.7.0, 0.8.0-0.8.4, 0.9.0-0.9.1] or uninstalled
     └─restricted to versions 0.9.1-0.9 by JuMP [4076af6c], leaving only versions 0.9.1
       └─JuMP [4076af6c] log:
         ├─possible versions are: 0.19.2 or uninstalled
         └─JuMP [4076af6c] is fixed to version 0.19.2

(v1.1) pkg> add CPLEX
 Resolving package versions...
  Updating `C:\Users\Himanshi\.julia\environments\v1.1\Project.toml`
  [a076750e] + CPLEX v0.3.3
  Updating `C:\Users\Himanshi\.julia\environments\v1.1\Manifest.toml`
  [a076750e] + CPLEX v0.3.3

(v1.1) pkg> build CPLEX
  Building CPLEX → `C:\Users\Himanshi\.julia\packages\CPLEX\FUtHu\deps\build.log`
┌ Error: Error building `CPLEX`:
│ ERROR: LoadError: UndefVarError: is_apple not defined
│ Stacktrace:
│  [1] top-level scope at none:0
│  [2] include at .\boot.jl:326 [inlined]
│  [3] include_relative(::Module, ::String) at .\loading.jl:1038
│  [4] include(::Module, ::String) at .\sysimg.jl:29
│  [5] include(::String) at .\client.jl:403
│  [6] top-level scope at none:0
│ in expression starting at C:\Users\Himanshi\.julia\packages\CPLEX\FUtHu\deps\build.jl:18
└ @ Pkg.Operations C:\Users\Himanshi\AppData\Local\Julia-1.1.1\share\julia\stdlib\v1.1\Pkg\src\Operations.jl:1075

(v1.1) pkg> up JuMP@0.20
  Updating registry at `C:\Users\Himanshi\.julia\registries\General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
 Resolving package versions...
  Updating `C:\Users\Himanshi\.julia\environments\v1.1\Project.toml`
 [no changes]
  Updating `C:\Users\Himanshi\.julia\environments\v1.1\Manifest.toml`
 [no changes]

(v1.1) pkg> add Clp
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package Clp [e2554f3b]:
 Clp [e2554f3b] log:
 ├─possible versions are: [0.0.5-0.0.10, 0.1.0-0.1.1, 0.2.0-0.2.2, 0.3.0-0.3.1, 0.4.0, 0.5.0-0.5.1, 0.6.0-0.6.2] or uninstalled
 ├─restricted to versions * by an explicit requirement, leaving only versions [0.0.5-0.0.10, 0.1.0-0.1.1, 0.2.0-0.2.2, 0.3.0-0.3.1, 0.4.0, 0.5.0-0.5.1, 0.6.0-0.6.2]
 ├─restricted by julia compatibility requirements to versions: [0.5.0-0.5.1, 0.6.0-0.6.2] or uninstalled, leaving only versions: [0.5.0-0.5.1, 0.6.0-0.6.2]
 └─restricted by compatibility requirements with LinQuadOptInterface [f8899e07] to versions: [0.0.5-0.0.10, 0.1.0-0.1.1, 0.2.0-0.2.2, 0.3.0-0.3.1, 0.4.0] or uninstalled — no versions left
   └─LinQuadOptInterface [f8899e07] log:
     ├─possible versions are: [0.1.0, 0.2.0, 0.3.0-0.3.1, 0.4.0-0.4.3, 0.5.0, 0.6.0] or uninstalled
     └─restricted by compatibility requirements with MathOptInterface [b8f27783] to versions: uninstalled
       └─MathOptInterface [b8f27783] log:
         ├─possible versions are: [0.1.0, 0.2.0, 0.3.0, 0.4.0-0.4.1, 0.5.0-0.5.1, 0.6.0-0.6.4, 0.7.0, 0.8.0-0.8.4, 0.9.0-0.9.1] or uninstalled
         └─restricted to versions 0.9.1-0.9 by JuMP [4076af6c], leaving only versions 0.9.1
           └─JuMP [4076af6c] log:
             ├─possible versions are: 0.19.2 or uninstalled
             └─JuMP [4076af6c] is fixed to version 0.19.2

(v1.1) pkg>      

The simplest way to solve a problem like this is to create an environment that contains only the packages you need

pkg> activate --shared SomeEnv
pkg> add Pkg1 Pkg2 Pkg3
julia> import Pkg, Pkg2, Pkg3

Pkg differentiates between the set of installed packages and the set of available packages given any environment. This means that creating new environments is very inexpensive, so don’t be afraid to create a new environments!


Also, there appears to be a bug in the CPLEX build code.