autoconf:找不到命令

autoconf: command not found

我正在尝试使用 asdf install ruby 2.8.0-dev 通过 asdf 安装 ruby 2.8.0-dev,但出现以下错误:

Cloning https://github.com/ruby/ruby.git...
Installing ruby-master...

BUILD FAILED (Ubuntu 20.04 using ruby-build 20200401)

Inspect or clean up the working tree at /tmp/ruby-build.20200523221649.37283.rxnWxu
Results logged to /tmp/ruby-build.20200523221649.37283.log

Last 10 log lines:
/tmp/ruby-build.20200523221649.37283.rxnWxu ~
Cloning into 'ruby-master'...
/tmp/ruby-build.20200523221649.37283.rxnWxu/ruby-master /tmp/ruby-build.20200523221649.37283.rxnWxu ~
/home/carlos/.asdf/plugins/ruby/ruby-build/bin/ruby-build: line 622: autoconf: command not found

我在 Ubuntu 20.04

我用谷歌搜索了这个,但没有找到任何有用的信息。

此致。

我 运行 遇到了类似的问题,this 帮我修复了它。

简而言之,运行:

sudo apt-get install autoconf bison build-essential libssl-dev libyaml-dev libreadline6 libreadline6-dev zlib1g zlib1g-dev

首先,关于如何自己解决这个问题的一些一般性建议,而不必来 [so] 并等待其他人来解决您的问题:

计算机非常擅长搜索。因此,在 90% 的情况下,当计算机告诉您找不到某物时,那是因为那东西不存在。

所以,如果我处于你的情况,我首先要检查的是计算机告诉我它找不到的东西是否真的存在。特别是,我会检查我是否安装了 autoconf

在另外 10% 的情况下,计算机正在寻找的东西在那里,但它不在计算机正在寻找的地方。所以,我要检查的第二件事是 autoconf 是否在 $PATH.

几乎总是按照这两个步骤解决我的问题。

现在,针对您的具体问题:当您要编译某个软件时,您需要相应的工具。这些工具包括但不限于软件编写语言的编译器(在本例中为 C)、构建工具(在本例中为 Make)、软件使用的所有库的头文件(在本例中为例如 libyamlzlib、OpenSSL),也许是一些配置工具(在本例中为 autoconf)。 YARV 还使用 Bison 生成其解析器。

通常,这些必需的工具会列在软件的开发人员或贡献者文档中。虽然有时候,人们只是假设通过直接从源代码编译来安装软件的人足够聪明,可以自己弄清楚他们需要哪些工具。对于 YARV,有 documentation about the requirements for running the testsuite,这隐含地也需要首先构建代码。

基于 Debian 的 Linux 发行版(Debian、Ubuntu、Mint 等)有一个方便的元包,称为 build-essential that depends on some of the most important tools, e.g. gcc and make as well as the dpkg-dev metapackage(这又依赖于许多其他包).

ASDF Ruby plugin actually uses ruby-build under the hood, and the documentation directly links to the system requirements,其中列出如下:

apt install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm6 libgdbm-dev libdb-dev