Makefile error make (e=2): The system cannot find the file specified

前端 未结 8 667
有刺的猬
有刺的猬 2020-12-09 09:20

I am using a makefile in windows to push some files on a Unix server (here a text file \"blob.txt\" in the same folder of my makefile). My makefile script is:



        
相关标签:
8条回答
  • 2020-12-09 09:53

    I know this is an old question that has been answered, but thought I'd and my experiences for anyone still running into this. I was getting the same cryptic error Colonel Beauvel (though with the windows MOVE command, not pscp):

    process_begin: CreateProcess(NULL, move /y foo\bar.c .\baz.c, ...) failed.
    make (e=2): The system cannot find the file specified.
    

    Our CI was running the same Makefile and working perfectly. Turns out CI was using mingw32-make and I was using GNU make. Uninstalling GNU make (which got installed as part of an unrelated bulk package) and aliasing mingw32-make to 'make' works perfectly.

    0 讨论(0)
  • 2020-12-09 09:53

    To build on user3869623's response.

    In my case i had git\bin in my %PATH% which contains bash.exe and sh.exe.. Removing %GIT_HOME%\bin from the PATH worked for me

    While this recommendation may allow make to run, it will likely cause issues for git, especially if the makefile is installing software from a git repository.

    A better solution is to simply change %GIT_HOME%\bin to %GIT_HOME%\cmd

    0 讨论(0)
提交回复
热议问题