在运行mix ecto.create
创建的Postgres数据库我收到以下错误。
==> argon2_elixir
could not compile dependency :argon2_elixir, "mix compile" failed. You can recompile this dependency with "mix deps.compile argon2_elixir", update it with "mix deps.update argon2_elixir" or clean it with "mix deps.clean argon2_elixir"
==> snitch_core
** (Mix) "nmake" not found in the path. If you have set the MAKE environment variable,
please make sure it is correct.
我定义它,如下mix.exs
文件夹下的文件apps
:
# auth
{:elixir_make, "~> 0.4.2"},
{:comeonin, "~> 4.1.1"},
{:argon2_elixir, "~> 1.3.3"},
尝试作为错误信息提示,但没有任何帮助,重新编译套件。
欣赏帮助在此方面。
看来,你没有nmake
安装。你在Windows上我相信?安装nmake
这种或那种方式,例如见this answer。
我能够最终解决这个问题。这里是攻击的问题,并解决它,不论你的具体问题的一般方法。
首先,我复制从Visual Studio文件夹nmake.exe
的C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.15.26726\bin\Hostx64\x64\
和System32文件夹中粘贴。运行该命令mix ecto.create
和接收到解决问题上改变了复杂的错误。以下是错误的输出:** (Mix) Could not compile with "nmake" (exit status: 2).
One option is to install a recent version of
[Visual C++ Build Tools](http://landinghub.visualstudio.com/visual-cpp-build-tools)
either manually or using [Chocolatey](https://chocolatey.org/) -
choco安装VisualCppBuildTools`。
安装的Visual C ++生成工具后,看在“程序文件(x86)”目录搜索“微软的Visual Studio”。记下该文件夹的最高版本号的完整路径。打开下面的命令(请确保路径和版本号是正确的)中的“运行”命令,输入:
cmd /K "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
这将打开一个命令提示符设置必要的环境变量,并从中你将能够运行“混合编译”,“混合deps.compile”和“混考” commands.`
按照此行,行,成功就在你的脚下。 :)