autotools是个系列工具,首先确认你的Ubuntu系统是否安装了以下工具(可以通过which命令查看):
aclocal
autoscan
autoconf
autoheader
automake
安装方法:
root@ubuntu:~# sudo apt-get install autoconf
显示如下:
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
E: 无法找到软件包 autoscan
将会安装下列额外的软件包:
automake autotools-dev m4
建议安装的软件包:
autoconf2.13 autobook autoconf-archive gnu-standards autoconf-doc libtool
gettext
下列【新】软件包将被安装:
autoconf automake autotools-dev m4
共升级了 0 个软件包,新安装了 4 个软件包,要卸载 0 个软件包,有 28 个软件未被升级。
需要下载 1315kB 的软件包。
解压缩后会消耗掉 4366kB 的额外空间。
您希望继续执行吗?[Y/n]
输入y,安装
ubuntu:~$ sudo apt-get install autoconf
[sudo] password for chengchenglu:
Reading package lists... Done
Building dependency tree
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 m4-doc
The following NEW packages will be installed:
autoconf automake autotools-dev libsigsegv2 m4
0 upgraded, 5 newly installed, 0 to remove and 102 not upgraded.
Need to get 1,082 kB of archives.
After this operation, 3,994 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 libsigsegv2 amd64 2.12-1 [14.7 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 m4 amd64 1.4.18-1 [197 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 autoconf all 2.69-11 [322 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 autotools-dev all 20180224.1 [39.6 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 automake all 1:1.15.1-3ubuntu2 [509 kB]
Fetched 1,082 kB in 8s (144 kB/s)
Selecting previously unselected package libsigsegv2:amd64.
(Reading database ... 176317 files and directories currently installed.)
Preparing to unpack .../libsigsegv2_2.12-1_amd64.deb ...
Unpacking libsigsegv2:amd64 (2.12-1) ...
Selecting previously unselected package m4.
Preparing to unpack .../archives/m4_1.4.18-1_amd64.deb ...
Unpacking m4 (1.4.18-1) ...
Selecting previously unselected package autoconf.
Preparing to unpack .../autoconf_2.69-11_all.deb ...
Unpacking autoconf (2.69-11) ...
Selecting previously unselected package autotools-dev.
Preparing to unpack .../autotools-dev_20180224.1_all.deb ...
Unpacking autotools-dev (20180224.1) ...
Selecting previously unselected package automake.
Preparing to unpack .../automake_1%3a1.15.1-3ubuntu2_all.deb ...
Unpacking automake (1:1.15.1-3ubuntu2) ...
Setting up libsigsegv2:amd64 (2.12-1) ...
Processing triggers for install-info (6.5.0.dfsg.1-2) ...
Setting up m4 (1.4.18-1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Setting up autotools-dev (20180224.1) ...
Processing triggers for man-db (2.8.3-2) ...
Setting up autoconf (2.69-11) ...
Setting up automake (1:1.15.1-3ubuntu2) ...
update-alternatives: using /usr/bin/automake-1.15 to provide /usr/bin/automake (automake) in auto mode
最好一起安装它建议安装的软件包,否则autotools工具使用可能出错。
root@ubuntu:~# sudo apt-get install autotools-dev m4 autoconf2.13 autobook autoconf-archive gnu-standards autoconf-doc libtool