简体   繁体   中英

configure: error: no acceptable C compiler found in $PATH

I am trying to Build and Install the Apache Thrift compiler and libraries

I had to type this command is shown in instructions ./configure && make But I get this error:

checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/PATH/TO/thrift-0.9.3':
configure: error: no acceptable C compiler found in $PATH

When I type in my command prompt gcc --version I get this

gcc (GCC) 5.3.0 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

It finds the gcc compiler. However, when I run it from my msys2 Shell

bash: gcc: command not found

The path in Environment variables is correct. C:\\MinGW\\bin

Yet it canno't find gcc

Thanks in advance!

The path to your gcc compiler is not in the PATH .

You may add it before you run make.

export PATH=${PATH}:/c/MinGW/bin
./configure && make

Goodluck.

If it is centos/redhat machine install full set of development package

$ sudo yum groups install "Development Tools"

it includes gcc,g++,make Id. After installing try again

This tread is old, however, it worked for me by enabling "set MSYS2_PATH_TYPE=inherit" in the startup script. Running mingw64.exe in the root of MSYS2 worked as well.

For the future: If on Windows 10 and MSYS2. I uncommented the line

set MSYS2_PATH_TYPE=inherit

on msys2_shell.cmd, so it just inherits the path where you put everything on windows.

I'm surprised this is not the default!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM