Artifact hash mismatch when installing libpng (Julia 1.6.1)

During today I have tried several times to update Julia and I receive the following alert:

 up
    Updating registry at `C:\Users\Hermesr\.julia\registries\General`
    Updating git-repo `C:\Users\Hermesr\Documents\GitHub\VMLS.jl`
  Downloaded artifact: libpng
 Downloading artifact: libpng
┌ Error: Hash Mismatch!
│   Expected sha256:   6c2666da0aa1d8075709982c776d773c51999b678d9ba839df27caf031c778df
│   Calculated sha256: b9ba090f4936eba4051e9af5207996edcd7859f3c2bb709358e0959fa196446d
└ @ Pkg.PlatformEngines C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\PlatformEngines.jl:61  Downloaded artifact: libpng
ERROR: Unable to automatically install 'libpng' from 'C:\Users\Hermesr\.julia\packages\libpng_jll\9vklf\Artifacts.toml'
Stacktrace:
  [1] error(s::String)
    @ Base .\error.jl:33
  [2] ensure_artifact_installed(name::String, meta::Dict{String, Any}, artifacts_toml::String; platform::Base.BinaryPlatforms.Platform, verbose::Bool, quiet_download::Bool, io::Base.TTY)
    @ Pkg.Artifacts C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Artifacts.jl:443
  [3] ensure_all_artifacts_installed(artifacts_toml::String; platform::Base.BinaryPlatforms.Platform, pkg_uuid::Nothing, include_lazy::Bool, verbose::Bool, quiet_download::Bool, io::Base.TTY)
    @ Pkg.Artifacts C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Artifacts.jl:508
  [4] download_artifacts(ctx::Pkg.Types.Context, pkg_roots::Vector{String}; platform::Base.BinaryPlatforms.Platform, verbose::Bool, io::Base.TTY)
    @ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:706
  [5] download_artifacts(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; platform::Base.BinaryPlatforms.Platform, julia_version::VersionNumber, verbose::Bool, io::Base.TTY)
    @ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:683
  [6] up(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, level::Pkg.Types.UpgradeLevel)
    @ Pkg.Operations C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Operations.jl:1321
  [7] up(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; level::Pkg.Types.UpgradeLevel, mode::Pkg.Types.PackageMode, update_registry::Bool, kwargs::Base.Iterators.Pairs{Symbol, Base.TTY, Tuple{Symbol}, NamedTuple{(:io,), Tuple{Base.TTY}}})
    @ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:260
  [8] up(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:79
  [9] up(pkgs::Vector{Pkg.Types.PackageSpec})
    @ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:77
 [10] do_cmd!(command::Pkg.REPLMode.Command, repl::REPL.LineEditREPL)
    @ Pkg.REPLMode C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\REPLMode\REPLMode.jl:408
 [11] do_cmd(repl::REPL.LineEditREPL, input::String; do_rethrow::Bool)
    @ Pkg.REPLMode C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\REPLMode\REPLMode.jl:386
 [12] do_cmd
    @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\REPLMode\REPLMode.jl:377 [inlined]
 [13] (::Pkg.REPLMode.var"#24#27"{REPL.LineEditREPL, REPL.LineEdit.Prompt})(s::REPL.LineEdit.MIState, buf::IOBuffer, ok::Bool)
    @ Pkg.REPLMode C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\REPLMode\REPLMode.jl:550
 [14] #invokelatest#2
    @ .\essentials.jl:708 [inlined]
 [15] invokelatest
    @ .\essentials.jl:706 [inlined]
 [16] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
    @ REPL.LineEdit C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\REPL\src\LineEdit.jl:2441
 [17] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
    @ REPL C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\REPL\src\REPL.jl:1126
 [18] (::REPL.var"#44#49"{REPL.LineEditREPL, REPL.REPLBackendRef})()
    @ REPL .\task.jl:411

How to proceed?

If you do:

download("https://github.com/JuliaBinaryWrappers/libpng_jll.jl/releases/download/libpng-v1.6.38+0/libpng.v1.6.38.x86_64-w64-mingw32.tar.gz", "libpng_jll")

using SHA
open(sha256, "libpng_jll") |> bytes2hex

what does it say?

julia> download("https://github.com/JuliaBinaryWrappers/libpng_jll.jl/releases/download/libpng-v1.6.38+0/libpng.v1.6.38.x86_64-w64-mingw32.tar.gz", "libpng_jll")
"libpng_jll"

julia>

julia> using SHA

julia> open(sha256, "libpng_jll") |> bytes2hex
"63fa43b99f70f5b66b48c2174d0da5f8129f4253b36e323c1ce65233821d063f"

That’s strange, you should have gotten:

Is something sitting between you and the internet and intercepting things?

Does the downloaded file even contain the correct things, for example, what happens if you run:

using Pkg.PlatformEngines: exe7z
using Tar
open(`$(exe7z()) x "libpng_jll" -so`) do tar
    Tar.extract(tar, "libpng_jll_extracted")
end
@show readdir("libpng_jll_extracted")
julia> using Pkg.PlatformEngines: exe7z

julia> using Tar

julia> open(`$(exe7z()) x "libpng_jll" -so`) do tar
           Tar.extract(tar, "libpng_jll_extracted")
       end
ERROR: libpng_jll
Can not open the file as archive

ERROR: failed process: Process(setenv(`'C:\Users\Hermesr\AppData\Local\Programs\Julia-1.6.1\libexec\7z.exe' x libpng_jll -so`,["PATH=C:\\Users\\Hermesr\\AppData\\Local\\Programs\\Julia-1.6.1\\bin\\..\\lib\\julia;C:\\Users\\Hermesr\\AppData\\Local\\Programs\\Julia-1.6.1\\bin\\..\\lib;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\CheckPoint\\Endpoint Security\\Endpoint Common\\bin;C:\\Program Files\\gnuplot\\bin;C:\\Program Files\\Git\\cmd;C:\\Users\\Hermesr\\AppData\\Local\\Programs\\Python\\Python38\\Scripts\\;C:\\Users\\Hermesr\\AppData\\Local\\Programs\\Python\\Python38\\;C:\\Users\\Hermesr\\AppData\\Local\\Programs\\Python\\Launcher\\;C:\\Users\\Hermesr\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\Hermesr\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Users\\Hermesr\\AppData\\Local\\GitHubDesktop\\bin;C:\\Users\\Hermesr\\ProgramData\\chocoportable\\bin;C:\\Users\\Hermesr\\AppData\\Roaming\\CoolProp;C:\\Users\\Hermesr\\ProgramData\\chocoportable\\lib\\mingw\\tools\\install\\mingw64\\bin;", "USERDOMAIN_ROAMINGPROFILE=ELECTRA_CON", "HOMEPATH=\\", "PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC", "SESSIONNAME=Console", "SYSTEMROOT=C:\\Windows", "APPDATA=C:\\Users\\Hermesr\\AppData\\Roaming", "CHOCOLATEYTOOLSLOCATION=C:\\tools", "PSMODULEPATH=C:\\Program Files\\WindowsPowerShell\\Modules;C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules", "COMMONPROGRAMW6432=C:\\Program Files\\Common Files"  …  "PROGRAMFILES(X86)=C:\\Program Files (x86)", "PROGRAMFILES=C:\\Program Files", "CHOCOLATEYLASTPATHUPDATE=132652732277150141", "LOGONSERVER=\\\\ECPDC01", "FPS_BROWSER_USER_PROFILE_STRING=Default", "SYSTEMDRIVE=C:", "FPS_BROWSER_APP_PROFILE_STRING=Internet Explorer", "DADIR=C:\\Program Files (x86)\\CheckPoint\\Endpoint Security\\Endpoint Common", "PROCESSOR_ARCHITECTURE=AMD64", "OPENBLAS_MAIN_FREE=1"]), ProcessExited(2)) [2]

Stacktrace:
 [1] pipeline_error
   @ .\process.jl:525 [inlined]
 [2] open(::var"#1#2", ::Cmd; kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ Base .\process.jl:400
 [3] open(::Function, ::Cmd)
   @ Base .\process.jl:391
 [4] top-level scope
   @ REPL[6]:1

julia> @show readdir("libpng_jll_extracted")
readdir("libpng_jll_extracted") = String[]
String[]

julia>

So you are getting a bad file somehow, what’s its size?

julia> filesize("libpng_jll")
526536
filesize("libpng_jll")
1969

Anything readable in it?

julia> read("libpng_jll", String)
read("libpng_jll", String)
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n\n<!--//////////////////////////////////////////////////////////////////////////\n//\n//    Copyright (c) 1996 - 2014, Websense, Inc.    All Rights Reserved\n//    See WebsenseCopyright.txt for copyright information\n//\n///////////////////////////////////////////////////////////////////////////-->\n\n<html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n<title>Access to this site is blocked</title>\n<link rel=\"stylesheet\" href=\"/en/Default/master.css\" type=\"text/css\">\n<script type=\"text/javascript\" language=\"javascript\" src=\"/en/Default/master.js\"></script>\n<script type=\"text/javascript\" language=\"javascript\" src=\"/en/Default/base64.js\"></script>\n<script type=\"text/javascript\" language=\"javascript\" src=\"/en/Default/security.js\"></script>\n</head>\n<body>\n\n<!--[if lt IE 7]> <div style=\"width: 725px;\"> <![endif]-->\n<div align = \"center\">\n<div align = \"center\" style=\"border: 1px solid #285EA6;width: 95%; max-width: 700px; overflow: hidden; margin-left: 10px; background-color: #EEF2F7;\">\n\t<iframe src=\"http://10.110.1.82:15871/cgi-bin/block_message.cgi?ws-session=-351626514\" title=\"test\" name=\"ws_block\" frameborder=\"0\" scrolling=\"auto\" style=\"width:100%; height: 15em;\">\n\n\t</iframe>\n\t<iframe src=\"http://10.110.1.82:15871/cgi-bin/blockOptions.cgi?ws-session=-351626514\" name=\"ws_blockoption\" frameborder=\"0\" scrolling=\"auto\" style=\"width:100%; height: 17.5em;\">\n\t\t<p>To enable further options, view this page with a browser that supports iframes</p>\n\t</iframe>\n\t<div><img title=\"ECP\" src=\"/Images/wslogo_block_page.png\" alt=\"Ashtrom\" style=\"float: right;clear: both;margin: 0px 10px 6px 0px; padding: 2px 0px;\">\n\t\t<div style=\"clear: both; overflow: hidden; height:1px;\"></div>\n\t</div>\n</div>\n<!--[if lt IE 7]> </div> <![endif]-->\n<div id=\"light\" class=\"white_content\"></div>\n<div id=\"fade\" class=\"black_overlay\"></div>\n</body>\n</html>\n"

What happens if you go to
https://github.com/JuliaBinaryWrappers/libpng_jll.jl/releases/download/libpng-v1.6.38+0/libpng.v1.6.38.x86_64-w64-mingw32.tar.gz in your browser?

I think you are behind some type of firewall (by https://www.forcepoint.com/) that blocks this download and replaces it with some blocking HTML page.

There is nothing really that the Julia community can do about this, you need to contact the one in charge of the firewall.

2 Likes

Access is prohibited
According to the company’s policy, this site is blocked for browsing. For more information, please contact information systems

Potentially Unwanted Software: The above category is not approved by Information Security Prohibited Access

Well, there you go.

2 Likes

There’s a solution?
What to do?

Ask your company to not block this. There is nothing anyone here can do.

To put it in other terms, the package manager is like the post-service. However, your company has locked the delivery box so the post-service can’t deliver the package. There is nothing that the post-service can do about that, the company has to unlock the box.

5 Likes

Short question, does it mean that I can’t use Julia?

No, it means, you can’t use the internet as you want to. Your organization is prohibiting it.

And how to update the packages?

Without a working Internet connection?

This.

In julia 1.5.4 everything works fine from the same PC !!! ???

(@v1.5) pkg> up
   Updating registry at `C:\Users\Hermesr\.julia\registries\General`
   Updating git-repo `C:\Users\Hermesr\Documents\GitHub\TernaryPlots\TernaryPlots.jl`
   Updating git-repo `C:\Users\Hermesr\Documents\GitHub\Julia-Registers\CoolProp.jl`
  Installed SentinelArrays ─ v1.3.0
  Installed ArrayInterface ─ v3.1.15
  Installed CSV ──────────── v0.8.5
Updating `C:\Users\Hermesr\.julia\environments\v1.5\Project.toml`
  [537997a7] ↑ AbstractPlotting v0.15.27 ⇒ v0.18.2
  [dc211083] ↑ Gnuplot v1.3.0 ⇒ v1.4.0
  [ee78f7c6] ↑ Makie v0.12.0 ⇒ v0.13.2
  [6fe1bfb0] ↑ OffsetArrays v1.8.0 ⇒ v1.9.0
  [91a5bcdd] ↑ Plots v1.15.0 ⇒ v1.15.2
  [276daf66] ↑ SpecialFunctions v1.4.0 ⇒ v1.4.1
Updating `C:\Users\Hermesr\.julia\environments\v1.5\Manifest.toml`
  [537997a7] ↑ AbstractPlotting v0.15.27 ⇒ v0.18.2
  [4fba245c] ↑ ArrayInterface v3.1.14 ⇒ v3.1.15
  [6e4b80f9] ↑ BenchmarkTools v0.7.0 ⇒ v1.0.0
  [336ed68f] ↑ CSV v0.8.4 ⇒ v0.8.5
  [d360d2e6] ↑ ChainRulesCore v0.9.43 ⇒ v0.9.44
  [3da002f7] ↑ ColorTypes v0.10.12 ⇒ v0.11.0
  [c3611d14] ↑ ColorVectorSpace v0.8.7 ⇒ v0.9.5
  [34da2185] ↑ Compat v3.29.0 ⇒ v3.30.0
  [864edb3b] ↑ DataStructures v0.17.20 ⇒ v0.18.9
  [b4f34e82] ↑ Distances v0.9.2 ⇒ v0.10.3
  [b38be410] ↑ FreeType v3.0.1 ⇒ v4.0.0
  [663a7486] ↑ FreeTypeAbstraction v0.8.4 ⇒ v0.9.1
  [f7f18e0c] - GLFW v3.4.1
  [e9467ef8] - GLMakie v0.1.30
  [5c1252a2] ↑ GeometryBasics v0.3.10 ⇒ v0.3.12
  [dc211083] ↑ Gnuplot v1.3.0 ⇒ v1.4.0
  [cd3eb016] ↑ HTTP v0.8.19 ⇒ v0.9.9
  [2ab3a3ac] ↑ LogExpFunctions v0.2.3 ⇒ v0.2.4
  [ee78f7c6] ↑ Makie v0.12.0 ⇒ v0.13.2
  [7269a6da] - MeshIO v0.4.7
  [66fc600b] - ModernGL v1.1.2
  [ca575930] + NetworkOptions v1.2.0
  [6fe1bfb0] ↑ OffsetArrays v1.8.0 ⇒ v1.9.0
  [91a5bcdd] ↑ Plots v1.15.0 ⇒ v1.15.2
  [91c51154] ↑ SentinelArrays v1.2.16 ⇒ v1.3.0
  [65257c39] - ShaderAbstractions v0.2.6
  [992d4aef] ↑ Showoff v0.3.2 ⇒ v1.0.3
  [276daf66] ↑ SpecialFunctions v1.4.0 ⇒ v1.4.1
  [09ab397b] ↑ StructArrays v0.4.2 ⇒ v0.5.1
  [62fd8b95] + TensorCore v0.1.1
  [5c2747f8] + URIs v1.3.0

(@v1.5) pkg>