Torchx compile failure: ** (MatchError) no match of right hand side value: {:error, :bad_eocd}

Hello ,
Getting the below error about matching while trying to use livebook or even trying the Mix.install from the command line :

iex(1)> Mix.install(
…(1)> [
…(1)> {:kino_bumblebee, “~> 0.5.0”},
…(1)> {:torchx, “>= 0.0.0”}
…(1)> ],
…(1)> config: [nx: [default_backend: Torchx.Backend]]
…(1)> )
==> torchx
could not compile dependency :torchx, “mix compile” failed. Errors may have been logged above. You can recompile this dependency with “mix deps.compile torchx --force”, update it with “mix deps.update torchx” or clean it with “mix deps.clean torchx”
** (MatchError) no match of right hand side value: {:error, :bad_eocd}
c:/Users/ashra/AppData/Local/mix/Cache/installs/elixir-1.17.1-erts-15.0/9574f12e35c9dbee311aad4b1aba0134/deps/torchx/mix.exs:164: Torchx.MixProject.download_and_unzip/2
(mix 1.17.1) lib/mix/task.ex:574: Mix.Task.run_alias/6
(mix 1.17.1) lib/mix/tasks/compile.all.ex:108: Mix.Tasks.Compile.All.run_compiler/2
(mix 1.17.1) lib/mix/tasks/compile.all.ex:88: Mix.Tasks.Compile.All.compile/4
(mix 1.17.1) lib/mix/tasks/compile.all.ex:62:
(mix 1.17.1) lib/mix/task.ex:495: anonymous fn/3 in Mix.Task.run_task/5
(mix 1.17.1) lib/mix/tasks/compile.ex:159:

I would suggest trying with a lower version of Elixir. The previous one – 1.16 – should be fine.

I had problems compiling a library on Elixir 1.17 soon ago (not the same as yours).

There’s been a previous thread with a related error, but no resolution:

Are you doing anything to customize LIBTORCH_TARGET or LIBTORCH_VERSION?

Some other observations, none of which suggest immediate solutions:

  • some settings for those variables on Windows will result in HTTP errors instead of an archive, for instance the Windows download for 2.0.0 with CUDA 11.8

  • downloading a CUDA version that does exist yields a ~2.3GB file, while the :zip library specifies that archive size is limited to 2GB. I don’t have a Windows machine handy to test, but at least on Mac that 2GB limit doesn’t appear to have any effect.

1 Like


I am not trying to do something special , actually I am just trying to test Neural network smart cells of livebook “I have interest in speech to text if you speak in multiple languages” I installed Visual studio community edition then some other added libraries for C++ from VS installer then I ran the command :
cmd /K “C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat” amd64
as per the other notes I found here and in stackoverflow but still failing.
I am not able to understand the failure compile message below :
(MatchError) no match of right hand side value: {:error, :bad_eocd}