简体   繁体   English

Elixir:mix deps.get 请求失败(403)并且没有缓存副本

[英]Elixir: mix deps.get Request failed (403) and no cached copy

I am attempting to start using ratatouille in a project.我正在尝试在项目中开始使用料理鼠王 This is, I believe, the latest version of rataouille from github.我相信这是来自 github 的最新版本的rataouille。

I started a new project for my learnings:我开始了一个新的学习项目:

mix new rata_count

In the ratatouille installation instructions I use the deps:在料理鼠王安装说明中,我使用了 deps:

  defp deps do
    [{:ratatouille, "~> 0.5.0"} ]
  end

Other than this deps code, the rest of mix.exs is as generated with "mix new rata_count".除了这个 deps 代码,mix.exs 的其余部分是用“mix new rata_count”生成的。 I have added no additional code to this project.我没有向这个项目添加额外的代码。

mix deps.get responds: mix deps.get 回应:

mix deps.get
Resolving Hex dependencies...
Dependency resolution completed:
New:
  asciichart 1.0.0
  elixir_make 0.6.0
  ex_termbox 1.0.1
  ratatouille 0.5.0
* Updating ratatouille (Hex package)
* Getting ex_termbox (Hex package)
Request failed (403)
** (Mix) Package fetch failed and no cached copy available (https://repo.hex.pm/tarballs/ex_termbox-1.0.1.tar)

A search reveals nothing for this error.搜索没有发现此错误。

I was able to compile and run the github examples of ratatouille.我能够编译和运行料理鼠王的 github 示例。 All the examples worked as specified.所有示例都按规定工作。 Now I cannot seem to use rataouille in my projects.现在我似乎无法在我的项目中使用料理鼠王。

My system is Centos 7, elixir 1.9.4, Erlang/OTP 22 [erts-1-.4.3] 64 bits.我的系统是 Centos 7,elixir 1.9.4,Erlang/OTP 22 [erts-1-.4.3] 64 位。

How do I resolve this error?如何解决此错误? Should I create a cached version?我应该创建一个缓存版本吗? How do I create a cached version?如何创建缓存版本?

Is hex down?十六进制了吗?

https://hex.pm/packages/ex_termbox has: https://hex.pm/packages/ex_termbox有:

Recent Activity近期活动

  • Mar 15, 2020 Revert release 1.0.1 2020 年 3 月 15 日恢复版本 1.0.1

Delete your mix.lock file (which has, presumably, chosen to pin 1.0.1).删除您的mix.lock文件(大概已选择固定 1.0.1)。

Alternatively, your top-level project should specify an exact version of ex_termbox :或者,您的顶级项目应指定ex_termbox的确切版本:

  defp deps do
    [
      {:ratatouille, "~> 0.5.0"},
      {:ex_termbox, "1.0.0"}
    ]
  end

...and then delete mix.lock and the deps directory, before running mix deps.get again. ...然后在再次运行mix deps.get之前删除mix.lockdeps目录。

I ran into this issue as well and nothing I tried fixed it.我也遇到了这个问题,但我没有尝试修复它。 A day later, I tried running mix deps.get again and had no problems.一天后,我再次尝试运行mix deps.get并且没有问题。 So it may just be a server-side issue.所以这可能只是服务器端的问题。

Roger Lipscombe suggested I use the top level mix.exs deps as: Roger Lipscombe 建议我使用顶级 mix.exs deps 作为:

  defp deps do
    [{:ratatouille, "~> 0.5.0"}, {:ex_termbox, "1.0.0"}]
  end

This worked.这奏效了。

I noticed that deps/ratatouille/mix.exs also used a dependency of {:ex_termbox, "1.0"}.我注意到 deps/ratatouille/mix.exs 也使用了 {:ex_termbox, "1.0"} 的依赖项。 I don't understand why ratatouille could not find this, but I can now proceed.我不明白为什么料理鼠王找不到这个,但我现在可以继续了。

Thank you Roger for your advice and timely replies.感谢 Roger 的建议和及时的回复。 :) :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM