【Linux】【curl】ubuntu编译libcurl
来源:互联网 发布:淘宝做活动怎么做 编辑:程序博客网 时间:2024/06/02 02:49
一、下载libcurl http://curl.haxx.se/download/curl-7.21.1.tar.gz
二、安装 指定了安装目录 /usr/local/curl
注意:在这里最好用默认的路径
命令1: ./configure --prefix=/usr/local/curl该为命令:./configure
这样,在编译程序的时候直接使用 gcc -o filename -Wall filename.c -lcurl 就不会出现编译链接错误,
如果你的路径改变了,那么在编译程序时可能会比较麻烦。
结果:
curl version: 7.21.1
Host setup: i686-pc-linux-gnu
Install prefix: /usr/local/curl
Compiler: gcc
SSL support: enabled (OpenSSL)
SSH support: no (--with-libssh2)
zlib support: enabled
krb4 support: no (--with-krb4*)
GSSAPI support: no (--with-gssapi)
SPNEGO support: no (--with-spnego)
resolver: default (--enable-ares / --enable-threaded-resolver)
ipv6 support: enabled
IDN support: enabled
Build libcurl: Shared=yes, Static=yes
Built-in manual: enabled
Verbose errors: enabled (--disable-verbose)
SSPI support: no (--enable-sspi)
ca cert bundle: /etc/ssl/certs/ca-certificates.crt
ca cert path: no
LDAP support: enabled (OpenLDAP)
LDAPS support: enabled
RTSP support: enabled
RTMP support: no (--with-librtmp)
Protocols: DICT FILE FTP FTPS HTTP HTTPS IMAP IMAPS LDAP LDAPS POP3 POP3S RTSP SMTP SMTPS TELNET TFTP
命令2:make
命令3:sudo make install
可以看到lib库,已经安装在 /usr/local/curl/lib
----------------------------------------------------------------------
Libraries have been installed in:
/usr/local/curl/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
在安装目录下/usr/local/curl下会有四个目录 bin include lib share 包含了所需的库、头文件等
0 0
- 【Linux】【curl】ubuntu编译libcurl
- GDAL编译,链接cUrl库(libCurl)
- curl libcurl 编译依赖库 安装
- linux下编译libcurl
- Linux编译libcurl库
- curl libcurl
- curl编译,Windows/Ubuntu
- Linux下 手动编译libcurl
- 解决PHP编译cURL的reinstall the libcurl问题
- Java Curl 开发记录(三) 使用ndk编译libcurl
- VS2015静态编译libcurl(C++ curl封装类)
- Ubuntu+NDK编译支持HTTPS的libcurl
- libcurl 使用说明和网页抓取 linux下的curl编程
- Curl和libcurl使用
- curl->libcurl详解
- libcurl和curl简介
- linux 编译链接libcurl异常处理
- libcurl库 windows,linux 编译使用
- 因为婚姻不是过一天
- Jsp包含三个编译指令和七个动作指令。
- 一直到下班主要讨论一下项目具体的开发明细
- 第7周项目-简单程序
- 求两个整数之和,要求在函数体内不得使用+、-、*、/
- 【Linux】【curl】ubuntu编译libcurl
- 就业一大方向:关于研究所的一些东西
- 二叉树的前序·中序·后序遍历
- Struts学习及面试应用
- Java Timer使用
- 记录菜鸟玩Linux遇到的问题的回顾
- CSS优先级、CSS选择器、解决冲突——继承与层叠
- Linux/UNIX下使用ssh-keygen设置SSH无密码登录
- 新人求助,zend studio 的调试问题