libnice linux编译流程

写于2018-09-09,以便参考是哪个版本的libnice;

libnice的linux编译,也有各种坑,记录下以便大家采坑;

1、git clone https://gitlab.freedesktop.org/libnice/libnice.git

2、cd libnice,查看readme,里面有提示依赖的其他库

Requirements
------------

 glib >= 2.44
 pkg-config
 gnutls >= 2.12.0
 gupnp-igd >= 0.1.2 (optional)
 gstreamer-0.10 >= 0.10.0 (optional)
 gstreamer-1.0 (optional)

Build instructions

3、wget http://ftp.gnome.org/pub/gnome/sources/glib/2.48/glib-2.48.1.tar.xz 

tar -xvf glib-2.48.1.tar.xz

cd glib2.48.1.tar.xz

./autogen.sh提示:没安装gtk-doc

4、运行apt-get install gtk-doc-tools

5、下载https://nchc.dl.sourceforge.net/project/libpng/zlib/1.2.11/zlib-1.2.11.tar.gz

tar -zxvf zlib-1.2.11.tar.gz

cd zlib-1.2.11

./configure

提示:configure: error: Package requirements (libpcre >= 8.13) were not met:

好吧,接着下pcre:https://sourceforge.net/projects/pcre/files/pcre/8.42/pcre-8.42.zip

./configure --enable-utf8 --enable-unicode-properties(一定加上两个选项)

6、接着回来到glib目录

./autogen.sh

make && make install

7、回到libnice目录

接着要安装gnutls >= 2.12.0

wget ftp://ftp.gnutls.org/gcrypt/gnutls/v3.5/gnutls-3.5.0.tar.xz下载

./configure

又提示:Libnettle 3.1 was not found.没有

8、wget http://ftp.gnu.org/gnu/nettle/nettle-3.1.tar.gz

./configure

9、回到gnutls

./configure 

Libhogweed (nettle's companion library) was not found. Note that you must compile nettle with gmp support.

好吧,网上查,是因为nettle安装不正确,可是找半天没找到hogweed,而且需要gmp support;

看了下gnutls的README,偶然发现这句话:

cd nettle-<version>
    ./configure --prefix=/usr --disable-openssl --enable-shared --enable-mini-gmp
    make
    sudo make install

好吧,看来要指定安装目录,而且要是shared的,重新编译nettle吧

10、重新回到gnutls

./configure

提示:gmp was not found

11、运行:sudo apt-get install libgmp-dev

12、在到gnutls:

./configure

又提示: Libtasn1 4.3 was not found.

wget ftp://ftp.gnu.org/gnu/libtasn1/libtasn1-4.4.tar.gz

./configure && make && make install

12、回到gnutls

./configure

还提示:p11-kit >= 0.23.1

13、wget https://github.com/p11-glue/p11-kit/archive/0.23.10.tar.gz

configure && make && make install

14、回到gnutls

总算通过了

15、回到libnice目录

./autogen.sh

make -j8

ok总算编译成功了

 

 

 

 

 

  • 3
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值