bash 未找到配置命令 cygwin

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/26298979/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 21:42:16  来源:igfitidea点击:

configure command not found cygwin

bashcygwin

提问by DevSolar

This question has been asked many time but I am not able to resolve the problem from them so I am asking

这个问题已被问过很多次,但我无法从他们那里解决问题,所以我问

I had installed Cygwin a few days ago.I tried using ./configurecommand but it says

几天前我安装了 Cygwin。我尝试使用./configure命令,但它说

-bash: ./configure: No such file or directory

-bash: ./configure: 没有那个文件或目录

I tried using

我尝试使用

where configure

but I got the output

但我得到了输出

INFO: Could not find files for the given pattern(s).

信息:找不到给定模式的文件。

then I tried grep configureand I got this output

然后我尝试grep configure并得到了这个输出

/etc/bash_completion.d/configure
/usr/i686-pc-cygwin/sys-root/usr/share/libtool/libltdl/configure
/usr/share/ELFIO/configure
/usr/share/libtool/libltdl/configure

I tried to export the path and then run the ./configurebut it also didn't worked.

我试图导出路径,然后运行,./configure但它也没有奏效。

I find no executable file named as configurein my cygwin bindirectory.

configure在 cygwinbin目录中找不到名为 as 的可执行文件。

Does it mean that I have to add configurefile manually?How can I correct it?

这是否意味着我必须configure手动添加文件?我该如何纠正?

NOTE :- I had also tried sh configurebut it also didn't worked

注意:-我也试过,sh configure但也没有奏效

回答by DevSolar

If a software project is set up to be built using autoconf, that tool generates a script canonically called configure. It queries the system for various parameters that are subsequently used in the build, and is specific to the software package to be built. Different software projects have different configurescripts. They are all called configure, but their contents are not the same.

如果将软件项目设置为使用autoconf构建,则该工具会生成一个规范名为configure. 它向系统查询随后在构建中使用的各种参数,并且特定于要构建的软件包。不同的软件项目有不同的configure脚本。它们都被称为configure,但它们的内容并不相同。

So, to actually build such a software project once that script was set up (usually done by the maintainers when packaging the source tarball for distribution), you call:

因此,要在设置脚本后实际构建这样的软件项目(通常由维护人员在打包源 tarball 以进行分发时完成),您可以调用:

tar xzf <tarball>.gz   # or xjf <tarball>.bz2 or whatever
cd <sourcedir>         # the one you just untarred
./configure
make
make install

Note the prefix ./, which means "located in this directory" (i.e. the top directory of that project's source tree).

注意前缀./,意思是“位于此目录中”(即该项目源代码树的顶层目录)。

Actually, the betterprocedure is the so-called "out-of-tree build", when you set up a differentdirectory for the binaries to be built in, so the source tree remains unmodified:

实际上,更好的过程是所谓的“树外构建”,当您为要构建的二进制文件设置不同的目录时,因此源树保持不变:

tar xzf <tarball>.gz     # or xjf <tarball>.bz2 or whatever
mkdir builddir
cd builddir
../<sourcedir>/configure
make
make install

So, there is supposedto be no configureexecutable in your PATH, you are supposed to call the script of that name from the source tree you are trying to build from.

因此,有认为是没有configure在你的可执行文件PATH,你应该从你从试图建立源树叫这个名字的脚本。

回答by damgad

If I correctly understood...

如果我理解正确...

Configure is not an application that should be installed on your system, but script that should be delivered with source code to prepare for makecommand. File named configureshould be in the main directory of source code.

Configure 不是应该安装在您的系统上的应用程序,而是应该与源代码一起交付以准备make命令的脚本。命名的文件configure应该在源代码的主目录中。

回答by Yeasin Ar Rahman

I understand that this is an old question. However many might find this solution helpful.

我知道这是一个老问题。但是,许多人可能会发现此解决方案很有帮助。

Normally we use the make command to compile a downloaded source in cygwin. In many cases it contains a autogen.sh file. Running that file with

通常我们使用 make 命令在 cygwin 中编译下载的源代码。在许多情况下,它包含一个 autogen.sh 文件。运行该文件

bash autogen.sh

will in many case solve the problem. At least it solved my issue and i could then use the make command

将在许多情况下解决问题。至少它解决了我的问题,然后我可以使用 make 命令