julia

How to update WinRPM in Julia version 0.6.4?


I'm new to Julia and I want to use COBRA Package. For adding COBRA I use command:

Pkg.add("COBRA")

But when running, I get these errors:

INFO: Building WinRPM

WARNING: skipping repodata/repomd.xml, not in cache -- call WinRPM.update() to download

WARNING: skipping repodata/repomd.xml, not in cache -- call WinRPM.update() to download

INFO: Downloading https://cache.julialang.org/http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_Leap_42.2/repodata/repomd.xml

WARNING: Unknown download failure, error code: 2148270086

WARNING: Retry 1/5 downloading: https://cache.julialang.org/http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_Leap_42.2/repodata/repomd.xml

until:

WARNING: Unknown download failure, error code: 2148270086

WARNING: Retry 5/5 downloading: https://cache.julialang.org/http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_Leap_42.2/repodata/repomd.xml

WARNING: received error 0 while downloading https://cache.julialang.org/http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_Leap_42.2/repodata/repomd.xml

After these errors, I have checked the link and I've found out the source is not there, anymore. So then I ran this command as said above:

WinRPM.update()

But it has thrown this error:

ERROR: UndefVarError: WinRPM not defined

Please Help me to add COBRA to Julia. I'm using version 0.6.4 because Cobra does not work on the next versions (Windows 10).


Solution

  • The problem, as you've mentioned, is that the original sources used by the package aren't valid URLs anymore. The proper way to solve this is to open a pull request with the package to change the URLs (which I've now done here ). As a stopgap measure, here's a hacky way to work around this issue for now:

    
    julia> WinRPM.sources[:] = replace.(WinRPM.sources, "Leap_42.3" => "Leap_15.3")
    2-element Vector{String}:
     "https://cache.julialang.org/http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_Leap_15.3"
     "https://cache.julialang.org/http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_Leap_15.3"
    
    

    I'm using version 0.6.4 because Cobra does not work on the next versions.

    I hope you mean Julia 1.6.4 here, or version 0.6.4 of something else in the stack. If you mean Julia version 0.6.4, you might face further problems down the road and find it hard to get support for such an old version.