Rebar3 не может загрузить зависимость от Windows 10

Я только начинаю с otp и rebar3. Ниже приведены установленные версии:

Эрланг/OTP 23

арматура 3.15.1 на Erlang/OTP 23 Erts 11.2

Однако, когда я пытаюсь добавить зависимость cowboy со страницы Basic Usage rebar3 , компиляция завершается со следующей ошибкой:

❯ rebar3 compile
===> Verifying dependencies...
===> Fetching cowboy v1.0.1
===> Failed to fetch and copy dep: {pkg,<<"cowboy">>,<<"1.0.1">>,
                               <<"810EFE0B51CBBB97B175E605A520963452990B6568F93306B4FE88955D40FE94">>,
                               <<"CF7F0969870EBAA68F6E176A1A9559BEC23FBB4B61988C9DECD7DF38D827C5A9">>,
                               #{api_key => undefined,
                                 api_organization => undefined,
                                 api_url => <<"https://hex.pm/api">>,
                                 http_adapter =>
                                  {r3_hex_http_httpc,#{profile => rebar}},
                                 http_etag => undefined,http_headers => #{},
                                 http_user_agent_fragment =>
                                  <<"(rebar3/3.15.1) (httpc)">>,
                                 name => <<"hexpm">>,repo_key => undefined,
                                 repo_organization => undefined,
                                 repo_public_key =>
                                  <<"-----BEGIN PUBLIC KEY-----\nPUBLICK-KEY-HERE\n-----END PUBLIC KEY-----">>,
                                 repo_verify => true,
                                 repo_verify_origin => true,
                                 tarball_max_size => 8388608,
                                 tarball_max_uncompressed_size => 67108864}}

Для удобства ниже приведен отчет rebar3, созданный с помощью команды rebar3 report compile:

❯ rebar3 report compile
Rebar3 report
 version 3.15.1
 generated at 2021-04-28T02:55:18+00:00
=================
Please submit this along with your issue at https://github.com/erlang/rebar3/issues (and feel free to edit out private information, if any)  
-----------------
Task: compile
Entered as:
  compile
-----------------
Operating System: win32
ERTS: Erlang/OTP 23 [erts-11.2] [source] [smp:8:8] [ds:8:8:10] [async-threads:1]
Root Directory: c:/Program Files (x86)/erl-23.3
Library directory: c:/Program Files (x86)/erl-23.3/lib
-----------------
Loaded Applications:
bbmustache: 1.10.0
certifi: 2.5.3
cf: 0.3.1
common_test: 1.20
compiler: 7.6.7
crypto: 4.9
cth_readable: 1.5.1
dialyzer: 4.3.1
edoc: 0.12
erlware_commons: 1.4.0
eunit: 2.6
eunit_formatters: 0.5.0
getopt: 1.0.1
hipe: 4.0.1
inets: 7.3.2
kernel: 7.3
providers: 1.8.1
public_key: 1.10
relx: 4.4.0
sasl: 4.0.2
snmp: 5.8
ssl_verify_fun: 1.1.6
stdlib: 3.14.1
syntax_tools: 2.5
tools: 3.4.4

-----------------
Escript path: c:/tools/rebar3/rebar3
Providers:
  app_discovery as clean compile compile cover ct deps dialyzer do edoc escriptize eunit get-deps help install install_deps list lock new path pkgs release relup report repos shell state tar tree unlock update upgrade upgrade upgrade version xref

мой rebar3.config файл:

{erl_opts, [debug_info]}.
{deps, [
  {cowboy, "1.0.1"}, % package
  {cowboy, {git, "git://github.com/ninenines/cowboy.git", {tag, "1.0.1"}}} % alternatively, source
]}.

{shell, [
  % {config, "config/sys.config"},
    {apps, [myapp]}
]}.

Я попытался загрузить другую зависимость, например libp2p, из шестнадцатеричного кода, но с той же ошибкой.

Любая помощь будет оценена. Спасибо.


person Harsh Gupta    schedule 28.04.2021    source источник


Ответы (1)


Попробуйте использовать:

{deps, [
  {cowboy, {git, "git://github.com/ninenines/cowboy.git", {tag, "1.0.1"}}}
]}.

or

{deps, [
  {cowboy, "1.0.1"}
]}.

не пробуйте два разных подхода для получения зависимостей одновременно.

P.S. Версия {cowboy, "1.0.1"} слишком старая и может не поддерживаться в версии OTP 23. Попробуйте использовать последнюю версию 2.8.0.

person Viacheslav    schedule 28.04.2021