MALOUDA-PSA 2024-04-03 20:52 采纳率: 85.6%
浏览 13
已结题

elixir安装hex的问题


mix local.hex
warning: the VM is running with native name encoding of latin1 which may cause Elixir to malfunction as it expects utf8. Please ensure your locale is set to UTF-8 (which can be verified by running "locale" in your shell)
warning: use Mix.Config is deprecated. Use the Config module instead
  config/config.exs:8

warning: use Mix.Config is deprecated. Use the Config module instead
  config/dev.exs:1

** (Mix) request timed out after 60000ms

Could not install Hex because Mix could not download metadata at https://repo.hex.pm/installs/hex-1.x.csv.

Alternatively, you can compile and install Hex directly with this command:

    mix archive.install github hexpm/hex branch latest
  • 写回答

3条回答 默认 最新

  • 专家-赤兔[在线] 优质创作者: 编程框架技术领域 2024-04-03 20:52
    关注

    引自免费微信小程序:皆我百晓生

    好的,让我们从如何下载Hex开始。

    根据你的错误消息,Hex缺少依赖项。这通常是因为Hex依赖于Hex仓库(https://github.com/hexpm/hex)。要解决这个问题,你需要首先安装Hex仓库。

    你可以通过运行mix hex install命令来安装Hex仓库。如果你已经安装了Hex仓库,那么在终端中输入mix hex update就能更新Hex仓库。

    如果Hex仓库没有包含你想要的版本,你可能需要手动编译Hex。下面是一个简单的示例:

    use Mix.Config;
    
    config developing do
      log :info, 'Building Hex version 1.0'
    end
    
    install hex 1.0
    

    在这个例子中,我们创建了一个开发环境,并安装了Hex版本1.0。

    一旦你成功安装了Hex,你可以通过mix hex compile命令编译Hex。

    use Mix.Config;
    
    config developing do
      log :info, 'Building Hex version 1.0'
    end
    
    compile hex 1.0
    

    在这个例子中,我们创建了一个开发环境,并编译了Hex版本1.0。

    以上就是安装Hex的基本步骤。如果你遇到任何其他问题,欢迎随时向我提问。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论 编辑记录
查看更多回答(2条)

报告相同问题?

问题事件

  • 系统已结题 4月12日
  • 已采纳回答 4月4日
  • 创建了问题 4月3日