Linux c使用gumbo库解析页面表单信息(一)

一.gumbo介绍

gumbo是一个由谷歌开发的,能够解析html页面的库。功能稳定可靠,使用起来十分方便。

二.gumbo安装

(1)从https://github.com/google/gumbo-parser下载gumbo

我是直接下载安装包的,当然你可以选择其他方式。

(2)安装环境的设置

gumbo安装之前应该安装有相应的源码编译软件

sudo apt-get install m4

sudo apt-get install automake

sudo apt-get install autoconf

sudo apt-get install libtool

以上可能记忆有误,大家还是根据错误提示进行吧,我的操作系统是ubuntu。

(3)源码编译

从官网上截图的安装说明大概是这样的

./automake

./configure  太多我没有截完

./make

sudo make install

至此编译完成。从上图可知gumbo库被安装在了/usr/local/lib当中了,头文件被安装在了usr/local/include中

 

原文地址:https://www.cnblogs.com/thegodofthunder/p/7232126.html