I am just starting with otp and rebar3. Following are the versions installed:
Erlang/OTP 23
rebar 3.15.1 on Erlang/OTP 23 Erts 11.2
However, when I am trying to add the dependency cowboy
from the Basic Usage page of rebar3, the compilation fails with the following error:
❯ 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}}
For convenience below is the rebar3 report which was generated using the command 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
my rebar3.config
file:
{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]}
]}.
I have tried downloading a different dependency such as libp2p
from hex but with same error.
Any help will be appreciated. Thank you.
1条答案
按热度按时间tez616oj1#
请尝试用途:
或
不要尝试同时使用两种不同的方法来获取依赖项。
P.S.
{cowboy, "1.0.1"}
版本太旧,可能在OTP 23
中不受支持。请尝试使用最新版本的2.8.0
。