23

I am a new Ubuntu user, I need to install autotools, when I search on the Internet various ways are given that do ./configure and stuff.

Please guide me on how to install autoconf, autotools etc on my system. A step by step guidance would be very helpful

28

To install autotools:

sudo apt-get install autotools-dev

To install autoconf

sudo apt-get install autoconf
  • combine the two in one line with a -y flag ftw sudo apt-get install -y autotools-dev autoconf. Now it can be run unattended – MrMesees Jul 25 '18 at 10:15
12

Installing from repositories is always prefered unless you need the last version of autotools. In that case you will have to download it manually and install it manually. GNU autotools are three packages: Autoconf, Automake and Libtool. Here are the steps to manually install it:

cd /usr/local/src

Autoconf:

wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz 
tar xf autoconf*
cd autoconf-2.69
sh configure --prefix /usr/local
make install

Automake:

wget http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz
tar xf automake*
cd automake-1.15
sh configure --prefix /usr/local
make install

Libtool:

wget http://mirror.jre655.com/GNU/libtool/libtool-2.4.6.tar.gz
tar xf libtool*
cd libtool-2.4.6
sh configure --prefix /usr/local
make install 

Most importantly You don't need autotools installed to run ./configure, that it's a key feature of autotools. On the other hand if you are not given the configure script you will need autotools installed to generate it.

Note make install will internally call make. Thus, there is no need in this case of calling make. Normally, Autotools expect you to call make without sudo privileges and make install with sudo. In this case for simplicity I skipped this guideline. It's (or is it?) fairly reasonable to trust there is no malware in the autotools generated Makefile.

  • i am absolutely green, I know about the tripartite invocation "./configure;make;make install". Why did you jumped "make" ? – sharkant May 10 '17 at 11:40
  • make install invokes make all which is what is called when you call make without argumenrs – Vicente Adolfo Bolea Sánchez May 10 '17 at 12:27
  • They normall suggest to run make without sudo and make install with sudo. However if you are in a folder that requires sudo permissions, you will need to use a both commands with sudo or just sudo make install – Vicente Adolfo Bolea Sánchez May 10 '17 at 12:28
  • Autoconf, Automake and Libtools have 3 different version number, Do they work well? or Do I need to carefully download the corresponding version or just arbitrary version? – gfan Oct 13 '17 at 9:35
  • I believe that there is some version interdependence among the packages. Rule of thumb will be to keep packages versions released in an interval of 5 years among each others. I have experience having to compile a fairly complex Autotools project released in 2003 as I remember. I had to download the automake, autoconf and libtool of that era to make it work. – Vicente Adolfo Bolea Sánchez Oct 16 '17 at 5:29
1

Installing autoconf is easy, type in the terminal:

sudo apt-get install autoconf
0

After installing the packages autoconf, automake and libtool, what I did was reconfigure because the error persisted. Then after reconfiguring I was allowed to compile and install without errors.

$ sudo sh configure --prefix /usr/local
$ sudo make install

The justification of why to use /usr/local and not /usr/local/apache2 I leave you in the next publication

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.