如何使用 Erlang/OTP 25 编译器重新编译 rebar3?运行灵药 1.13.4

2024-02-20

我正在关注免费的截屏视频/教程凤凰城 LiveView 启动器 https://online.pragmaticstudio.com/courses/liveview-starter/modules/2但我什至无法开始,因为mix setup失败并显示:

=ERROR REPORT==== 6-Jul-2022::12:47:58.702361 ===
beam/beam_load.c(551): Error loading function rebar3:parse_args/1: op put_tuple u x:
  please re-compile this module with an Erlang/OTP 25 compiler


escript: exception error: undefined function rebar3:main/1
  in function  escript:run/2 (escript.erl, line 750)
  in call from escript:start/1 (escript.erl, line 277)
  in call from init:start_em/1
  in call from init:do_boot/3
** (Mix) Could not compile dependency :telemetry, "/Users/martinstabenfeldt/.mix/rebar3 bare compile --paths /Users/martinstabenfeldt/Work/pragmaticstudio.com-liveview-starter/code-bundle/live_view_studio/_build/dev/lib/*/ebin" command failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile telemetry", update it with "mix deps.update telemetry" or clean it with "mix deps.clean telemetry"
$ elixir --version
Erlang/OTP 25 [erts-13.0.2] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [jit:ns] [dtrace]

Elixir 1.13.4 (compiled with Erlang/OTP 24)

我的 mix.exs 部门看起来像这样:

  defp deps do
    [
      {:phoenix, "~> 1.5.13"},
      {:phoenix_ecto, "~> 4.4"},
      {:ecto_sql, "~> 3.4"},
      {:postgrex, ">= 0.0.0"},
      {:phoenix_live_view, "~> 0.16.4"},
      {:floki, ">= 0.30.0", only: :test},
      {:phoenix_html, "~> 3.0.4"},
      {:phoenix_live_reload, "~> 1.2", only: :dev},
      {:phoenix_live_dashboard, "~> 0.4"},
      {:telemetry_metrics, "~> 0.6"},
      {:telemetry_poller, "~> 1.0"},
      {:gettext, "~> 0.11"},
      {:jason, "~> 1.0"},
      {:plug_cowboy, "~> 2.0"},
      {:faker, "~> 0.17.0"},
      {:number, "~> 1.0"}
    ]
  end

我不确定如何使用 OTP 25 编译器重新编译。 我正在运行 Elixir 1.13.4。它是用 OTP 24 编译的。不确定这是否与之有关? 我也尝试过 mix local-rebar --force and mix deps.update telemetry没有任何运气。


如果您要检查elixir --version仔细提示,你会发现这个:

Elixir 1.13.4 (compiled with Erlang/OTP 24)

假设你使用asdf https://asdf-vm.com/作为版本管理员,请确保您拥有正确的elixir /questions/tagged/elixir安装版本:

$ asdf list all elixir
...
1.13.4
1.13.4-otp-22
1.13.4-otp-23
1.13.4-otp-24
1.13.4-otp-25
...

你需要一个,编译过的OTP25, 意义

$ asdf install elixir 1.13.4-otp-25
$ asdf global elixir 1.13.4-otp-25

会做。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何使用 Erlang/OTP 25 编译器重新编译 rebar3?运行灵药 1.13.4 的相关文章

  • Elixir Phoenix 生产服务器出现 Letscrypt 续订问题

    我有一个使用 Elixir Phoenix 框架构建的网站 该网站在开发和生产模式下都运行良好 当phoenix服务器在开发模式下运行时 我更新Let s Encrypt证书没有问题 但是当完全一样应用程序正在生产模式下运行 尝试更新时我不
  • 在 Elixir 中,什么时候我们在原子名称之前或之后使用冒号?

    我正忙于学习 Elixir 并了解什么是原子 上基本类型页面 http elixir lang org getting started basic types html他们是这样介绍的 foo 然而 当我们遇到关键词列表 http elix
  • mix 在代理后面不起作用

    我一直都在用mix至少就在两周前落后于代理 但是我昨天发现 mix 无法在代理后面工作 混合版本是1 1 1 mix local hex 运行 但混合 deps get 会出现错误 mix deps get Registry update
  • 在 Elixir 中测试异步代码

    我想测试一个正在使用的函数Task async 为了让我的测试通过 我需要让它在断言之前休眠 100 毫秒 否则测试进程会在执行异步任务之前被终止 有没有更好的办法 编辑 添加代码示例 我想测试的代码 大致 def search param
  • 具有默认参数的函数的 Elixir 类型规范

    如何为接受一个具有默认值的参数的函数编写类型规范 像下面这样 def foo bar 10 do bar end 会是这样吗 spec foo integer integer 或者会是什么 谢谢 Yes 我想补充一点 如果您的问题是具有默认
  • 有什么方法可以在 Phoenix 中定义自定义路线吗?

    假设我想创建一个resources通过添加一些自定义操作 rails 中的类似物是 resources tasks do member do get implement end end 这不仅会返回 7 条标准路线 还会返回 1 条新路线
  • 在 Elixir 中运行 shell 命令

    我想通过我的 Elixir 代码执行一个程序 对给定字符串调用 shell 命令的方法是什么 是否存在非特定于平台的内容 以下是执行不带参数的简单 shell 命令的方法 System cmd whoami gt lukas n 0 查看有
  • Phoenix:使用 Content-Type: application/json 处理 POST 请求正文

    我想处理传入的 POSTapplication json内容类型 我只是想返回发布的 JSON 作为对测试的响应 如下所示 WebhookController 控制器 pipeline api do plug accepts json en
  • 如何测试 Phoenix 套接字是否已终止?

    我正在寻找一种方法来测试套接字是否被终止 被测试的代码执行以下操作 def handle in logout payload socket do stop logout socket gt assign user nil end 和我的测试
  • 在 Elixir 中部署时更改后端/模块?

    如何实现一个可替换的后端 或基本上任何部分或模块 以便可以在 Elixir 中的配置 部署时进行替换 我的具体情况是一个简单的网络应用程序 在本例中使用 Phoenix 但我猜这个问题也适用于其他情况 我有一个非常简单的后端 使用Agent
  • 如何将 Elixir 库加载到 iex 中而不将其添加到项目的 mix.exs deps 中?

    我想尝试 Poison json 模块而不创建混合项目 如何安装它并通过导入使其在 iex 中可用 我已经能够将它添加到项目中 然后在进入项目目录并使用 iex S mix 后使用它 tbrowne LILJEN code elixirTr
  • Elixir - 递归列表值的总和

    只是尝试对列表值进行简单求和 defmodule Mth do def sum list do 0 end def sum list H T do H sum list T end end IO puts Mth sum list 1 2
  • 打造 ecto 独一无二的领域

    如何制作一个字段unique在体外 我以为它和Ruby中的活动记录一样 但似乎不是 你想使用唯一约束 3 http hexdocs pm ecto Ecto Changeset html unique constraint 3 这与 Act
  • Ecto - 验证关联模型的存在

    如何验证 Ecto 中是否存在关联模型 schema foo do has many bar Bar timestamps end required fields w bar invalid 有办法这样做吗 并验证这些字段的最小 最大数量
  • 如何完全禁用 Elixir/Phoenix 生成器和模型中的上下文?

    凤凰城有一个发电机 mix phx gen html Accounts User users name string age integer 我不想为我的模型使用上下文 也不想提供它的名称 如何禁用它 您仍然可以使用 1 2 及更早版本中的
  • Ecto 中按日期时间查询

    这是我尝试过的 date Ecto DateTime from erl calendar universal time query gt where record record deadline gt date 我也尝试过 date Ect
  • 如何通过 SSL 从 Phoenix Web App 连接到 PostgreSQL?

    When trying to run Elixir Phoenix Web Application using PostgreSQL Database hosted 3rd party Database as a Service Azure
  • Elixir 用于列表、元组等的记录器

    我可以使用 Elixir 记录器来检查字符串 gt str string gt Logger info Here is a str info Here is a string 但是当我记录一个列表时 它看起来不太漂亮 gt list 1 2
  • 使用 Elixir 生成首字母头像 [关闭]

    Closed 这个问题需要多问focused help closed questions 目前不接受答案 我正在开发 Elixir 并希望提供头像服务 如果用户没有头像 可以制作一个带有他们姓名首字母缩写的头像 如下所示 我真的不知道从哪里
  • Elixir 中的多行注释

    大多数语言都允许块注释和多行命令 例如 HTML 中的多行注释如下所示 在 Elixir 中 我发现的最接近的东西来自 EEx docs https hexdocs pm eex EEx html EEx智能引擎似乎从源中被丢弃 即使它们是

随机推荐