./configure && make install失败

Osi*_*ani 8 linux pkg-config autotools configure rabbitmq

早安我正在安装RabbitMQ库时发现了一个问题:

autoreconf -i && ./configure && make && sudo make install
Run Code Online (Sandbox Code Playgroud)

但是./configure停在这个位置:

checking for gcc option to accept ISO C99... -std=gnu99
./configure: line 11104: syntax error near unexpected token `0.17'
./configure: line 11104: `PKG_PROG_PKG_CONFIG(0.17)'
Run Code Online (Sandbox Code Playgroud)

uml*_*ute 11

您的autotools项目使用pkg-config,但似乎您根本没有安装或缺少"pkg-config < - > autotools"glue(pkg.m4),它提供PKG_PROG_PKG_CONFIG宏.

如果这是真的,那么autoreconf -i应该在重新创建时抱怨configure(尽管可能仅作为非致命警告) - >检查你的构建日志.

你应该能够通过安装来解决这个问题 pkg-config

注意:通常,如果出现错误,最好将问题分解为子问题.因为你真的叫四个不同的任务(autoreconf,./configuremakesudo make install),你可能想通过一个执行它们之一,看到它实际上失败(在你的情况:第二个任务),和之前的步骤表明我们的(autoreconf呼叫).