# Can not update registry because download fails for "unexpected end of data"

**URL:** <https://discourse.julialang.org/t/can-not-update-registry-because-download-fails-for-unexpected-end-of-data/67041>\
**Category:** General Usage\
**Tags:** package\
**Created:** [August 26, 2021, 2:25pm UTC](https://discourse.julialang.org/t/can-not-update-registry-because-download-fails-for-unexpected-end-of-data/67041 "2021-08-26T14:25:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![melonedo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/melonedo/32/15503_2.png) [@melonedo](https://discourse.julialang.org/u/melonedo)\
**Post date:** [August 26, 2021, 2:25pm UTC](https://discourse.julialang.org/t/can-not-update-registry-because-download-fails-for-unexpected-end-of-data/67041/1 "2021-08-26T14:25:07Z")

</div>

When I try to install a package or update, package manager errors because downloaded file is corrupted (I checked with 7-zip and it complains with unexpected end of data too). Contrasted to download failure, pkg errors out

```julia
(@v1.6) pkg> update
    Updating registry at `C:\Users\melonedo\.julia\registries\General`
ERROR: Unexpected end of data : jl_fq7ZoDFNdV-download
┌ Warning: could not download https://pkg.julialang.org/registry/23338594-aafe-5451-b93e-139f81909106/3fbf7d7fb781baf649d90a4fe5b44cacf2617cc8
└ @ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:1156
ERROR: "C:\\Users\\melonedo\\AppData\\Local\\Temp\\jl_04Dj01\\Registry.toml": No such file
Stacktrace:
  [1] error(::String, ::String)
    @ Base .\error.jl:42
  [2] readstring
    @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\TOML\src\TOML.jl:21 [inlined]
......
 [19] 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
 [20] (::REPL.var"#44#49"{REPL.LineEditREPL, REPL.REPLBackendRef})()
    @ REPL .\task.jl:411

julia> versioninfo()
Julia Version 1.6.1
Commit 6aaedecc44 (2021-04-23 05:59 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i5-9300H CPU @ 2.40GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, skylake)
Environment:
  JULIA_PKG_SERVER = https://pkg.julialang.org

```

What can I do to trouble shoot this?

---

<div class="post-metadata">

**Author:** ![fregot](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fregot/32/29875_2.png) [@fregot](https://discourse.julialang.org/u/fregot)\
**Post date:** [October 15, 2021, 10:16am UTC](https://discourse.julialang.org/t/can-not-update-registry-because-download-fails-for-unexpected-end-of-data/67041/2 "2021-10-15T10:16:28Z")

</div>

I meet ths same error.

 ![截屏2021-10-12 下午9.46.03](https://global.discourse-cdn.com/julialang/original/3X/c/4/c4fe1bab77857c0b01a4ba68b2ceda00d02b8630.jpeg)

i try to do:

```julia
] registry rm General
] registry add https://github.com/JuliaRegistries/General

```

then, ok.

---

<div class="post-metadata">

**Author:** ![Ruizhi\_Yang](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ruizhi_yang/32/10344_2.png) [@Ruizhi\_Yang](https://discourse.julialang.org/u/Ruizhi_Yang)\
**Post date:** [November 17, 2021, 1:05pm UTC](https://discourse.julialang.org/t/can-not-update-registry-because-download-fails-for-unexpected-end-of-data/67041/3 "2021-11-17T13:05:50Z")

</div>

Actually it should be  
`registry add https://github.com/JuliaRegistries/General.git`
