Cyberithub

[Solved]: "autoreconf: not found" error

Advertisements

In this article, we will see how to solve autoreconf: not found error. Sometimes you might have noticed that during installation of a software through source code, "autoreconf: not found" error shows on the output when you try to run ./bootstrap script to generate the configure script file. As you may or may not know, if you try to install software from source code which was cloned from a git repo then in some cases you might have to run bootstrap script to generate the configure script. For example, in my case when I was trying to install libdaq library from source code, I had to run bootstrap script to generate configure script to proceed with the installation.

It is possible that when you try running ./bootstrap script, it shows "autoreconf: not found" error on the output as it happened with me. If you are also facing this error then I would recommend you to follow below explained solution steps to fix this error.

 

[Solved]: "autoreconf: not found" error

[Solved]: "autoreconf: not found" error

Also Read: How to Install jq(JSON processor) on Ubuntu 22.04

As I was explaining, when I tried to run ./bootstrap script to generate configure script to proceed with libdaq(the data acquisition library) installation, I received "autoreconf: not found" error on the output as shown below.

cyberithub@ubuntu:~/libdaq-3.0.12$ ./bootstrap
+ autoreconf -ivf --warnings=all
./bootstrap: 4: autoreconf: not found

While above error could occur due to many reasons but most of the time it is because of autoconf package not installed in the system. autoreconf is a part of autoconf package and this package is essentially used to generate configure script. So to fix the error, you have to install the autoconf package from default Ubuntu repo by running sudo apt-get install autoconf command as shown below. This will download and install the package along with all its dependencies.

cyberithub@ubuntu:~$ sudo apt-get install autoconf
[sudo] password for cyberithub:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
automake autotools-dev libsigsegv2 m4
Suggested packages:
autoconf-archive gnu-standards autoconf-doc libtool gettext m4-doc
The following NEW packages will be installed:
autoconf automake autotools-dev libsigsegv2 m4
0 upgraded, 5 newly installed, 0 to remove and 3 not upgraded.
Need to get 1,154 kB of archives.
After this operation, 4,241 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://in.archive.ubuntu.com/ubuntu jammy/main amd64 libsigsegv2 amd64 2.13-1ubuntu3 [14.6 kB]
Get:2 http://in.archive.ubuntu.com/ubuntu jammy/main amd64 m4 amd64 1.4.18-5ubuntu2 [199 kB]
Get:3 http://in.archive.ubuntu.com/ubuntu jammy/main amd64 autoconf all 2.71-2 [338 kB]
Get:4 http://in.archive.ubuntu.com/ubuntu jammy/main amd64 autotools-dev all 20220109.1 [44.9 kB]
Get:5 http://in.archive.ubuntu.com/ubuntu jammy/main amd64 automake all 1:1.16.5-1.3 [558 kB]
Fetched 1,154 kB in 2s (503 kB/s)
Selecting previously unselected package libsigsegv2:amd64.
(Reading database ... 234542 files and directories currently installed.)
Preparing to unpack .../libsigsegv2_2.13-1ubuntu3_amd64.deb ...
Unpacking libsigsegv2:amd64 (2.13-1ubuntu3) ...
Selecting previously unselected package m4.
Preparing to unpack .../m4_1.4.18-5ubuntu2_amd64.deb ...
Unpacking m4 (1.4.18-5ubuntu2) ...
Selecting previously unselected package autoconf.
Preparing to unpack .../autoconf_2.71-2_all.deb ...
Unpacking autoconf (2.71-2) ...
Selecting previously unselected package autotools-dev.
Preparing to unpack .../autotools-dev_20220109.1_all.deb ...
Unpacking autotools-dev (20220109.1) ...
Selecting previously unselected package automake.
Preparing to unpack .../automake_1%3a1.16.5-1.3_all.deb ...
Unpacking automake (1:1.16.5-1.3) ...
Setting up autotools-dev (20220109.1) ...
Setting up libsigsegv2:amd64 (2.13-1ubuntu3) ...
Setting up m4 (1.4.18-5ubuntu2) ...
Setting up autoconf (2.71-2) ...
Setting up automake (1:1.16.5-1.3) ...
update-alternatives: using /usr/bin/automake-1.16 to provide /usr/bin/automake (automake) in auto mode
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for install-info (6.8-4build1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.3) ...

If you have already installed autoconf package on a custom path then you have to export the path to global PATH environment variable using below export command. However to make the changes permanent, insert below line at the end of ~/.profile or ~/.bashrc file. Then logout and login to the system again to refresh the changes.

cyberithub@ubuntu:~$ export PATH=$PATH:/autoconf/path

It is possible that even after installing autoconf package, you might see another error automake failed with exit status: 1 while running the build or configure script. In that case, I would recommend you to follow article [Solved]: autoreconf: automake failed with exit status: 1 to solve the error.

Leave a Comment