下午好,我下载并编译了erlang 1.22 elixir 1.11 和phoenix 1.4。我创建了一个演示应用程序(研究框架),并设法安装了一些库 postgrex、plug_cowboy 等。我想尝试一下 zstd 并将其放在我的 mix.exs 文件中
defp deps do
[
{:phoenix, "~> 1.3.4"},
{:phoenix_pubsub, "~> 1.0"},
{:phoenix_ecto, "~> 3.2"},
{:postgrex, ">= 0.0.0"},
{:gettext, "~> 0.11"},
{:cowboy, "~> 1.0"},
{:plug_cowboy, "~> 1.0"},
{:ex_zstd, "~> 0.1.0"},
{:guardian, "~> 2.0"}
]
我输入了 mix.deps.get 并且一切都很好下载,但是一旦我尝试输入 mix phx.server 它就会给我这个错误
warning: found quoted keyword "test" but the quotes are not required. Note that keywords are always atoms, even when quoted. Similar to atoms, keywords made exclusively of Unicode letters, numbers, underscore, and @ do not require quotes
mix.exs:59
/usr/bin/make -C ../libzstd lib-release
make[1]: *** ../libzstd: No such file or directory. Stop.
Makefile:37: recipe for target 'priv/nif_ex_zstd.so' failed
make: *** [priv/nif_ex_zstd.so] Error 2
==> ex_zstd
Compiling 1 file (.ex)
could not compile dependency :ex_zstd, "mix compile" failed. You can recompile this dependency with "mix deps.compile ex_zstd", update it with "mix deps.update ex_zstd" or clean it with "mix deps.clean ex_zstd"
17:29:08.110 [warn] The on_load function for module Elixir.ExZstd returned:
{{:badmatch, {:error, {:load_failed, 'Failed to load NIF library: \'/home/eddyraz/proyectos/zunder/_build/dev/lib/ex_zstd/priv/nif_ex_zstd.so: cannot open shared object file: No such file or directory\''}}}, [{ExZstd, :__init__, 0, [file: 'lib/ex_zstd.ex', line: 12]}, {:code_server, :"-handle_on_load/5-fun-0-", 1, [file: 'code_server.erl', line: 1340]}]}
17:29:08.109 [error] Process #PID<0.197.0> raised an exception
** (MatchError) no match of right hand side value: {:error, {:load_failed, 'Failed to load NIF library: \'/home/eddyraz/proyectos/zunder/_build/dev/lib/ex_zstd/priv/nif_ex_zstd.so: cannot open shared object file: No such file or directory\''}}
lib/ex_zstd.ex:12: ExZstd.__init__/0
(kernel 6.5.2) code_server.erl:1340: anonymous fn/1 in :code_server.handle_on_load/5
** (KeyError) key :ex_doc not found in: %{libzstd: :compile}
(stdlib 3.12) :maps.get(:ex_doc, %{libzstd: :compile})
(mix 1.11.0-dev) lib/mix/tasks/compile.app.ex:357: anonymous fn/4 in Mix.Tasks.Compile.App.apps_from_prod_non_optional_deps/2
(elixir 1.11.0-dev) lib/enum.ex:2115: Enum."-reduce/3-lists^foldl/2-0-"/3
(mix 1.11.0-dev) lib/mix/tasks/compile.app.ex:355: Mix.Tasks.Compile.App.apps_from_prod_non_optional_deps/2
(mix 1.11.0-dev) lib/mix/tasks/compile.app.ex:345: Mix.Tasks.Compile.App.handle_extra_applications/2
(mix 1.11.0-dev) lib/mix/tasks/compile.app.ex:159: Mix.Tasks.Compile.App.run/1
(mix 1.11.0-dev) lib/mix/task.ex:397: Mix.Task.run_task/3
(mix 1.11.0-dev) lib/mix/tasks/compile.all.ex:76: Mix.Tasks.Compile.All.run_compiler/2
(我已经安装了 libzstd-dev 和 libzstd1-dev 并且 nothong 工作)。对此的任何启示都会非常感激,非常感谢。