autotools是个系列工具,首先确认你的Ubuntu系统是否安装了以下工具(可以通过which命令查看):
aclocal
autoscan
autoconf
autoheader
automake
安装方法:
sudo apt-get install autoconf
显示如下:
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
共升级了 0 个软件包,新安装了 4 个软件包,要卸载 0 个软件包,有 28 个软件未被升级。
需要下载 1315kB 的软件包。
解压缩后会消耗掉 4366kB 的额外空间。
您希望继续执行吗?[Y/n]
输入y,安装
装完后,用which 命令查看
如下:
lin@lenovo:~$ which aclocal
/usr/bin/aclocal
lin@lenovo:~$ which autoscan
/usr/bin/autoscan
lin@lenovo:~$ which autoconf
/usr/bin/autoconf
lin@lenovo:~$ which auto header
lin@lenovo:~$ automake
automake: `configure.ac' or `configure.in' is required
lin@lenovo:~$ which automake
/usr/bin/automake
sed -i s/-Werror// Makefile.in &&
./configure --prefix=/usr --disable-static &&
make -j1
make install4、进入到/usr/lib和/usr/include/cjson-c路径下查看一下,是否已经有了json-c的库文件和头文件,如果有了,说明安装成功。