Linux平台编译curl7.37.1(32位、64位)
2015-02-13 10:59
411 查看
一、代码准备
gunzip curl-7.37.1.tar.gz——解压
tar xvf curl-7.37.1.tar——解包
二、编译
32位编译
1)configure
2)make
至少在我的平台上没出现什么问题
在lib/.libs目录下找到libcurl.a和libcurl.so.4,如果需要,再拷贝libcurl.so.4到libcurl.so即可
在include/curl目录下,获取必要的头文件。(注意一点,不同平台下,配置出来的curlbuild.h是不同的)
64位编译
1)configure过程失败如下,
checking run-time libs availability... failed
configure: error: one or more libs available at link-time are not available run-time. Libs used at link-time: -lidn -lssh2 -lssl -lcrypto -lssl -lcrypto -ldl -lz -lldap -lz -lrt
找了一下,这些库都分别在/usr/lib64和/usr/local/lib目录下(libssh2.so在/usr/local/lib目录下,其他的在/usr/lib64),
export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib64:$LD_LIBRARY_PATH
再次configure,成功!显示各个模块的支持情况如下
2)make
大功告成。
gunzip curl-7.37.1.tar.gz——解压
tar xvf curl-7.37.1.tar——解包
二、编译
32位编译
1)configure
2)make
至少在我的平台上没出现什么问题
在lib/.libs目录下找到libcurl.a和libcurl.so.4,如果需要,再拷贝libcurl.so.4到libcurl.so即可
在include/curl目录下,获取必要的头文件。(注意一点,不同平台下,配置出来的curlbuild.h是不同的)
64位编译
1)configure过程失败如下,
checking run-time libs availability... failed
configure: error: one or more libs available at link-time are not available run-time. Libs used at link-time: -lidn -lssh2 -lssl -lcrypto -lssl -lcrypto -ldl -lz -lldap -lz -lrt
找了一下,这些库都分别在/usr/lib64和/usr/local/lib目录下(libssh2.so在/usr/local/lib目录下,其他的在/usr/lib64),
export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib64:$LD_LIBRARY_PATH
再次configure,成功!显示各个模块的支持情况如下
curl version: 7.37.1 Host setup: x86_64-unknown-linux-gnu Install prefix: /usr/local Compiler: gcc SSL support: enabled (OpenSSL) SSH support: enabled (libSSH2) zlib support: enabled GSS-API support: no (--with-gssapi) SPNEGO support: no (--with-spnego) TLS-SRP support: no (--enable-tls-srp) resolver: default (--enable-ares / --enable-threaded-resolver) ipv6 support: enabled IDN support: enabled Build libcurl: Shared=yes, Static=yes Built-in manual: enabled --libcurl option: enabled (--disable-libcurl-option) Verbose errors: enabled (--disable-verbose) SSPI support: no (--enable-sspi) ca cert bundle: /etc/pki/tls/certs/ca-bundle.crt ca cert path: no LDAP support: enabled (OpenLDAP) LDAPS support: enabled RTSP support: enabled RTMP support: no (--with-librtmp) metalink support: no (--with-libmetalink) HTTP2 support: disabled (--with-nghttp2) Protocols: DICT FILE FTP FTPS GOPHER HTTP HTTPS IMAP IMAPS LDAP LDAPS POP3 POP3S RTSP SCP SFTP SMTP SMTPS TELNET TFTP
2)make
大功告成。
相关文章推荐
- 32位的fortran函数库在64位Linux下编译及使用的方法
- 在64位linux上编译32位程序
- win7 64位平台编译的程序在XP 32位平台无法运行的解决方法
- 在64位linux下编译32位程序
- 在64位linux上编译32位程序 for i386 intel
- 如何在64位linux强制编译32位应用程序
- 32位linux操作系统上编译 64位应用程序
- 64位的linux装的hadoop是32位的,需要手工编译
- LINUX平台中判断Machine是64位的还是32位的(通过Linux命令,而非自己写测试程序)
- <摘录>如何在64位linux强制编译32位应用程序
- 64位Linux 编译32位程序
- 32位到64位:VS2013修改编译平台的方法
- 64位Linux下编译32位程序
- 64位Linux上编译32位软件
- 在linux gcc 64位平台编译动态链接库时出现的问题
- Linux 64位 编译32位程序
- 在64位Linux系统交叉编译32位软件:ffmpeg
- 在64位linux下编译32位程序
- Windows平台编译libiconv-1.11库(32位、64位)
- Windows平台编译openssl-0.9.8k库(32位、64位)