libghttp的使用


前言

需要使用get请求来获得点数据,但是由于需要用户名和密码,所以失败了,但是编译的过程还有其他还是有参考价值的。

一、libghttp是什么?

官方网站https://www.linuxfromscratch.org/blfs/view/6.2.0/gnome/libghttp.html

二、使用步骤

下载并传到LINUX上

./configure --prefix=/opt/gnome-1.4 &&
make

make install &&
install -v -m644 -D doc/ghttp.html
/opt/gnome-1.4/share/doc/libghttp-1.0.9/ghttp.html

这里会失败,在64位机器下configure时出现错误信息:
...

checking host system type… Invalid configuration x86_64-unknown-linux-gnu': machinex86_64-unknown’ not recognized
checking build system type… Invalid configuration x86_64-unknown-linux-gnu': machinex86_64-unknown’ not recognized

ltconfig: you must specify a host type if you use --no-verify' Tryltconfig --help’ for more information.
configure: error: libtool configure failed

大意是configure认不出系统的类型, 然后出现下面的 you must specify a host type. 解决方法是:

先手动下载在 /usr/share/libtool/下执行
wget -O ./config.sub “git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD”

wget -O ./config.guess “git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD”

下载到 /usr/share/libtool/
用 /usr/share/libtool/config.guess 覆盖 config.guess
用 /usr/share/libtool/config.sub 覆盖 config.sub

重新执行
./configure --prefix=/opt/gnome-1.4 &&
make

make install &&
install -v -m644 -D doc/ghttp.html
/opt/gnome-1.4/share/doc/libghttp-1.0.9/ghttp.html

1.引入库

安装后的库并不在正确位置需要手动拷贝一下,安装的库位置在这里

/opt/gnome-1.4/share/doc/libghttp-1.0.9

手动拷贝到cp /opt/gnome-1.4/share/doc/libghttp-1.0.9 /usr/local/lib
然后使用gcc编译即可


  • 22
    点赞
  • 20
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值