centos 7.6 源码编译curl 7.75.0

一、源码下载:

https://github.com/curl/curl/archive/refs/tags/curl-7_75_0.tar.gz

 

二、解压释放文件。 tar zxvf curl-7_75_0.tar.gz

 

三、查看没有configure文件。只有configure.ac文件,下面要生成configure文件

那么使用脚本buildconf

./buildconf

提示报错。*** Do not use buildconf. Instead, just use: autoreconf -fi  这行可以不用理会。只是提示。

1、【./buildconf: 第 4 行:exec: autoreconf: 未找到】 如果提示这个,需要安装autoconf库

yum install autoconf -y

2、提示报错【Can't exec "aclocal": 没有那个文件或目录 at /usr/share/autoconf/Autom4te/FileUtils.pm line 326.】 需要安装automake

yum install automake

3、提示报错

*** Do not use buildconf. Instead, just use: autoreconf -fi
configure:7404: error: possibly undefined macro: AC_LIBTOOL_WIN32_DLL
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure:7405: error: possibly undefined macro: AC_PROG_LIBTOOL

需要安装libtool

 yum install libtool

4、我认为下面的提示应该是生成成功了。

[root@localhost curl-curl-7_75_0]# ./buildconf
*** Do not use buildconf. Instead, just use: autoreconf -fi
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
libtoolize: Remember to add `LT_INIT' to configure.ac.
configure.ac:120: installing './compile'
configure.ac:185: installing './config.guess'
configure.ac:185: installing './config.sub'
configure.ac:120: installing './install-sh'
configure.ac:125: installing './missing'
docs/examples/Makefile.am: installing './depcomp'
parallel-tests: installing './test-driver'

[root@localhost curl-curl-7_75_0]#
[root@localhost curl-curl-7_75_0]# ls
acinclude.m4    buildconf      CMakeLists.txt  configure       depcomp   install-sh     m4                Makefile.in  plan9      RELEASE-NOTES  test-driver
aclocal.m4      buildconf.bat  compile         configure.ac    docs      lib            MacOSX-Framework  maketgz      projects   scripts        tests
appveyor.yml    CHANGES        config.guess    COPYING         GIT-INFO  libcurl.pc.in  Makefile.am       missing      README     SECURITY.md    winbuild
autom4te.cache  CMake          config.sub      curl-config.in  include   ltmain.sh      Makefile.dist     packages     README.md  src

四、configure 配置

[root@localhost curl-curl-7_75_0]# ./configure --prefix=/home/testAdd3rd/curl/output

./configure --prefix=/home/testAdd3rd/curl/output

make

make install

都是很正常的

[root@localhost output]# pwd
/home/testAdd3rd/curl/output
[root@localhost output]# ls ./lib
libcurl.a  libcurl.la  libcurl.so  libcurl.so.4  libcurl.so.4.7.0  pkgconfig
[root@localhost output]# ls ./include/
curl
[root@localhost output]# ls ./include/curl/
curl.h  curlver.h  easy.h  mprintf.h  multi.h  options.h  stdcheaders.h  system.h  typecheck-gcc.h  urlapi.h
[root@localhost output]# 

 

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值