安装 Cygwin 后在 $PATH 中找不到可接受的 C 编译器

发布于 2024-08-21 03:55:34 字数 4624 浏览 7 评论 0原文

我想在windowsXP上安装Kannel网关。为此我下载并安装了 Cygwin。但是当我去配置 Kannel 时,出现以下错误。 (我将PATH设置为C:\cygwin\bin;C:\libxml2-2.6.30+.win32\bin;)

Running system checks ...
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.

日志文件如下。

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.62.  Invocation command line was

$ ./configure 

## --------- ##
## Platform. ##
## --------- ##

hostname = sreeni9
uname -m = i686
uname -r = 1.7.1(0.218/5/3)
uname -s = CYGWIN_NT-5.1
uname -v = 2009-12-07 11:48

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = i686
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /cygdrive/c/WINDOWS/system32
PATH: /cygdrive/c/WINDOWS
PATH: /cygdrive/c/WINDOWS/System32/Wbem
PATH: /usr/bin
PATH: /cygdrive/c/libxml2-2.6.30+.win32/bin
PATH: /cygdrive/c/Program Files/Java/jdk1.6.0_16/bin
PATH: .


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2053: checking build system type
configure:2071: result: i686-pc-cygwin
configure:2093: checking host system type
configure:2108: result: i686-pc-cygwin
configure:2180: checking for gcc
configure:2210: result: no
configure:2277: checking for cc
configure:2324: result: no
configure:2380: checking for cl.exe
configure:2410: result: no
configure:2439: error: no acceptable C compiler found in $PATH
See `config.log' for more details.

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=i686-pc-cygwin
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_YACC_set=
ac_cv_env_YACC_value=
ac_cv_env_YFLAGS_set=
ac_cv_env_YFLAGS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=i686-pc-cygwin

## ----------------- ##
## Output variables. ##
## ----------------- ##

AR=''
CC=''
CFLAGS=''
CONVERT=''
CPP=''
CPPFLAGS=''
DEFS=''
DOCDRAFTS=''
DOCSTARGET=''
DVIPS=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
EXE_EXT=''
FIG2DEV=''
GREP=''
GW_VERSION=''
HTML_DSL=''
INSTALL_DATA=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
JADE=''
JADETEX=''
LDFLAGS=''
LEX=''
LEXLIB=''
LEX_OUTPUT_ROOT=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LTLIBOBJS=''
MYSQL_CONFIG=''
OBJEXT=''
OPENSSL=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
PCRE_CONFIG=''
PDFJADETEX=''
PERL=''
PGSQL_CONFIG=''
PKGADD_NAME='Kannel - WAP and SMS gateway'
PKGADD_PKG='KANNELgateway'
PKGADD_VENDOR='www.kannel.org'
RANLIB=''
SDB_CONFIG=''
SHELL='/bin/sh'
SIZEOF_INT=''
SIZEOF_LONG=''
SIZEOF_LONG_LONG=''
SIZEOF_SHORT=''
SQLITE3=''
SQLITE=''
STARTSTOPDAEMONSRC=''
SUFFIX=''
TEX_DSL=''
VERSION='1.4.3'
XML_CONFIG=''
YACC=''
YFLAGS=''
ac_ct_CC=''
bindir='${exec_prefix}/bin'
build='i686-pc-cygwin'
build_alias=''
build_cpu='i686'
build_os='cygwin'
build_vendor='pc'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${prefix}/share/doc/kannel'
dvidir='${docdir}'
exec_prefix='NONE'
host='i686-pc-cygwin'
host_alias=''
host_cpu='i686'
host_os='cygwin'
host_vendor='pc'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define GW_NAME "Kannel"
#define GW_VERSION "1.4.3"
#define VERSION "1.4.3"

configure: exit 1

I want to install Kannel gateway on windowsXP. For that I downloaded and installed Cygwin. But when I went to configure the Kannel I got the following errors. (I set the PATH as C:\cygwin\bin;C:\libxml2-2.6.30+.win32\bin;)

Running system checks ...
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.

The log file is as follows.

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.62.  Invocation command line was

$ ./configure 

## --------- ##
## Platform. ##
## --------- ##

hostname = sreeni9
uname -m = i686
uname -r = 1.7.1(0.218/5/3)
uname -s = CYGWIN_NT-5.1
uname -v = 2009-12-07 11:48

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = i686
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /cygdrive/c/WINDOWS/system32
PATH: /cygdrive/c/WINDOWS
PATH: /cygdrive/c/WINDOWS/System32/Wbem
PATH: /usr/bin
PATH: /cygdrive/c/libxml2-2.6.30+.win32/bin
PATH: /cygdrive/c/Program Files/Java/jdk1.6.0_16/bin
PATH: .


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2053: checking build system type
configure:2071: result: i686-pc-cygwin
configure:2093: checking host system type
configure:2108: result: i686-pc-cygwin
configure:2180: checking for gcc
configure:2210: result: no
configure:2277: checking for cc
configure:2324: result: no
configure:2380: checking for cl.exe
configure:2410: result: no
configure:2439: error: no acceptable C compiler found in $PATH
See `config.log' for more details.

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=i686-pc-cygwin
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_YACC_set=
ac_cv_env_YACC_value=
ac_cv_env_YFLAGS_set=
ac_cv_env_YFLAGS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=i686-pc-cygwin

## ----------------- ##
## Output variables. ##
## ----------------- ##

AR=''
CC=''
CFLAGS=''
CONVERT=''
CPP=''
CPPFLAGS=''
DEFS=''
DOCDRAFTS=''
DOCSTARGET=''
DVIPS=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
EXE_EXT=''
FIG2DEV=''
GREP=''
GW_VERSION=''
HTML_DSL=''
INSTALL_DATA=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
JADE=''
JADETEX=''
LDFLAGS=''
LEX=''
LEXLIB=''
LEX_OUTPUT_ROOT=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LTLIBOBJS=''
MYSQL_CONFIG=''
OBJEXT=''
OPENSSL=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
PCRE_CONFIG=''
PDFJADETEX=''
PERL=''
PGSQL_CONFIG=''
PKGADD_NAME='Kannel - WAP and SMS gateway'
PKGADD_PKG='KANNELgateway'
PKGADD_VENDOR='www.kannel.org'
RANLIB=''
SDB_CONFIG=''
SHELL='/bin/sh'
SIZEOF_INT=''
SIZEOF_LONG=''
SIZEOF_LONG_LONG=''
SIZEOF_SHORT=''
SQLITE3=''
SQLITE=''
STARTSTOPDAEMONSRC=''
SUFFIX=''
TEX_DSL=''
VERSION='1.4.3'
XML_CONFIG=''
YACC=''
YFLAGS=''
ac_ct_CC=''
bindir='${exec_prefix}/bin'
build='i686-pc-cygwin'
build_alias=''
build_cpu='i686'
build_os='cygwin'
build_vendor='pc'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${prefix}/share/doc/kannel'
dvidir='${docdir}'
exec_prefix='NONE'
host='i686-pc-cygwin'
host_alias=''
host_cpu='i686'
host_os='cygwin'
host_vendor='pc'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define GW_NAME "Kannel"
#define GW_VERSION "1.4.3"
#define VERSION "1.4.3"

configure: exit 1

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

糖果控 2024-08-28 03:55:34

看来你安装cygwin时没有安装gcc。重新运行安装程序,选择 gcc 进行安装。

Sounds like you didn't install gcc when you installed cygwin. Rerun setup, selecting gcc for installation.

一抹淡然 2024-08-28 03:55:34

好吧,我的第一个猜测是您实际上还没有安装 Cygwin 的全部。默认安装不会安装每个软件包,而只是安装一个子集。

这就是为什么我在运行 setup.exe(a) 时总是将安装类型更改为“完整”。

我不知道 gcc 是否包含在标准安装中,因为我从未安装过标准安装。但是,它应该位于 /usr/bin/gcc 中,与我的系统相同,并且位于您的路径上。打开 bash shell 并执行:

ls -al /usr/bin/gcc

以查看它是否存在。


(a) 请记住,这不是一个的过程,可能需要很多小时来下载/安装,这就是为什么我倾向于下载新版本一次并使用该缓存副本安装多次

Well, my first guess is that you haven't actually installed all of Cygwin. The default installation does not install every single package, just a subset.

That's why I always change the install type to 'Full' when I'm running setup.exe(a).

Whether gcc is included in the standard install, I don't know, since I never install the standard one. However, it should be in /usr/bin/gcc, the same as my system, and which is on your path. Open up the bash shell and execute:

ls -al /usr/bin/gcc

to see if it's there.


(a) Just keep in mind this isn't a fast process, potentially taking many hours to download/install, which is why I tend to download a new release once and use that cached copy to install many times.

娇纵 2024-08-28 03:55:34

这意味着您拥有不包含 gcc-g++ 编译器的 cygwin。

再次运行安装程序(setup-x86_64.exe),现在选择包

gcc-g++

然后设置就可以正常工作了。
我对此进行了测试并且工作正常。

This mean you have cygwin which does not contain the gcc-g++ compiler.

run setup(setup-x86_64.exe) again and now select package

gcc-g++

and then the setup will work fine.
I tested that and worked fine.

等待我真够勒 2024-08-28 03:55:34

如果您已经安装了apt-cyg,您可以使用以下命令进行安装:

apt-cyg install gcc-g++

If you have installed the apt-cyg, you can use bellow command for install it:

apt-cyg install gcc-g++
绻影浮沉 2024-08-28 03:55:34

安装cygwin时需要选择gcc、gdb、make等,这些选项不是默认的。可以在包的开发选项卡中找到。

You need to select gcc, gdb , make etc while installing cygwin , those options are not default . can be found in devel tab of packages.

蓦然回首 2024-08-28 03:55:34

如果您在 Cygwin 设置对话框中选择“从 Internet 安装”以外的提供选项之一,则可能会发生这种情况:

在此处输入图像描述

如果您使用其他选项,似乎最终可能会丢失文件。我在两台不同的机器上尝试过,在这两种情况下,Devel 类别中都只有一个文件,与 gcc 无关。尽管逐行检查并检查所有内容以进行完整安装,但还是如此。

在绝望中,我尝试了我能想到的任何方法,当我尝试“从互联网安装”时,两台机器立即在“开发”类别中显示一个巨大的列表,包括 gcc 条目,然后我得到了完整的安装。

这可能是镜像/下载故障,因为我发现使用互联网选项后,我无法在任何一台机器上重现原始问题。 (我试图这样做,以获得这篇文章的屏幕截图。)但是在不同的机器上连续两次出现相同的下载故障似乎很奇怪。

不管它到底是如何发生的,事实仍然是,下载似乎成功了,并且我从未收到任何问题的通知,因此没有任何迹象表明有任何理由怀疑我已经下载了完整的文件集。最终的结果是,在选择下载到磁盘然后从磁盘安装之后,我永远陷入丢失文件的困境,不知道问题是什么。幸运的是,我偶然发现使用互联网选项可以解决这个问题。

This can happen if you choose one of the offered options other than "Install from Internet" in the Cygwin Setup dialog:

enter image description here

If you use the other options, it seems you can end up with missing files. I tried on two different machines and in both cases there was only a single file in the Devel category, nothing to do with gcc. This despite going through line by line and checking everything for a full install.

In desperation I was trying anything I could think of, and as soon as I tried "Install from Internet", both machines immediately showed a huge list in the Devel category including the gcc entries, and I then got a full install.

It may have been a mirror/download glitch, as I found that after using the internet option, I could not then reproduce the original problem on either machine. (I tried to do so, to get a screenshot for this post.) But it would seem odd to get the same download glitch twice in a row on different machines.

Regardless of exactly how it can happen, the fact remains, the download appeared successful and at no time was I notified of any problem, so there was no indication of any reason to doubt that I had downloaded the full set of files. And the net effect was, after making the choice to download to disk and then install from that, I was forever stuck with missing files, with no clue as to what the problem was. By a lucky chance I stumbled on the fact that using the internet option would fix the problem.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文