windows11下,启动elxir的项目,获取不到对应依赖,报缺少nmake 环境的错误处理

在本地windows11环境下,mix compile 编译某个项目时,遇到个问题,报错信息如下:

**(Mix) “nmake ” not found in the path. If you have set the MAKE enviroment variable.

具体信息如下图:

 

 

由于本人用的vs code 工具,

Visual Studio: 面向软件开发人员和 Teams 的 IDE 和代码编辑器 (microsoft.com)

 

 

而需要安装C++的相关插件依赖,需安装社区版的,同时下载安装C++的相关插件(安装插件较大,时间较长,耐(等)心(待)

安装后,在环境变量中添加相关信息

In windows 10, you must add NMAKE to your path。

 

 

在cmd下 执行,where nmake 看是否ok

 

 

这时, 可以执行

cmd /K "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64 

 

而这个路径是VS 的C++ 本地插件的安装路径,根据自己机器安装路径修改即可。

 "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64 

Run this command on cmd and run mix deps.compile  normarly.

发现,deps下所需要的依赖都被拉下来了,包括这个 bcrypt_elixir 依赖。

 

之前是由于windows本地,没有namke的环境,导致获取不下来。

 

现在 再去mix deps.compile   ##获取依赖,

 

 

 

 ok,依赖项全部搞定,后面 compile,release打包等,可开启一段新的之旅。

 

参考 stackoverflow   cygwin - How to fix "could not compile dependency :bcrypt_elixir" error on Windows? - Stack Overflow

 

posted @ 2022-06-17 14:02  孤独信徒  阅读(313)  评论(0编辑  收藏  举报