[英]Error compiling Ejabberd dependency of a Phoenix application with Mix: could not compile dependency :ejabberd, “mix compile” failed
[英]Why do I get this error `(Mix) Could not find an SCM for dependency :cowboy `
我有一个elixir
项目,下面是混合配置文件:
defmodule MyFirstApp.Mixfile do
use Mix.Project
def project do
[
app: :my_first_app,
version: "0.1.0",
elixir: "~> 1.5",
start_permanent: Mix.env == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger],
mod: {MyFirstApp, []}
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
# {:dep_from_hexpm, "~> 0.3.0"},
# {:dep_from_git, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.1.0"},
{:cowboy, "~> 1.1.2"},
{:plug, "~> 1.3.4"},
{:slime, "~> 0.14"}
]
end
end
在ubuntu上运行mix deps.get
时出现以下错误:
mix deps.get
Could not find Hex, which is needed to build dependency :cowboy
Shall I install Hex? (if running non-interactively, use "mix local.hex --force") [Yn] ** (Mix) Could not find an SCM for dependency :cowboy from MyFirstApp.Mixfile
Exited with code 1
我不明白为什么会在这里发生。 似乎缺少对Hex
依赖关系,但是如何在系统上安装Hex
?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.