zoukankan      html  css  js  c++  java
  • 【Complier】Makefile error make (e=2): The system cannot find the file specified

    ###Date: 2018-3-20

    ____________________________________________________________________________________

         在编译某库过程中,突然出现如下编译错误:

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

    原因:


    经过排查分析,是由于最近安装了git造成的,gmake.exe与git安装路径bin目录下面的bash.exe或sh.exe出现冲突造成编译错误。


    解决方案:

    去掉%Path%中的gitin路径,编译成功。

    案例:

    在 stackoverflow下看到了相同问题:


    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:

    setup:
            pscp blob.txt username@hostname:/folder/
    

    I start a command prompt, go in the folder where blob.txt and the makefile are present and type:

    make setup
    

    Which results in:

    pscp blob.txt username@hostname:/folder/
    process_begin: CreateProcess(NULL, pscp blob.txt username@hostname:/folder/, ...) failed.
    make (e=2): The system cannot find the file specified.
    make: *** [setup] Error 2
    

    In a #fail ... whereas if I enter directly the command in the command prompt:

    pscp blob.txt username@hostname:/folder/
    

    It works ... I really wonder why.

    4 Answers


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


    参考:

    http://blog.csdn.net/luuillu/article/details/50728354

    http://blog.csdn.net/u010746364/article/details/52870947

    https://stackoverflow.com/questions/33674973/makefile-error-make-e-2-the-system-cannot-find-the-file-specified

    本文为博主原创文章,未经博主允许不得转载。若允许转载,请注明来源https://www.cnblogs.com/SoaringLee/,否则保留追究法律责任的权利!另外,本人提供付费咨询服务并长期承接各类毕设以及外包项目。联系QQ:2963033731。加Q备注:CSDN外包
  • 相关阅读:
    华为交换机配置命令总结
    Linux 系统启动项修复
    Linux菜鸟成长日记 ( Linux 下的 ftp 文件传输协议 )
    Linux 查看用户命令
    linux 查看过滤命令命令
    Linux篇---ftp服务器的搭建
    linux挂载详解
    园区IP地址规划(非常详细)
    Linux创建、删除文件和文件夹命令
    CentOs 7 安装 Xampp
  • 原文地址:https://www.cnblogs.com/SoaringLee/p/10532532.html
Copyright © 2011-2022 走看看