怎样安装libtasn1

2016年8月9日 | 分类: 【技术】

【介绍】

GNU Libtasn1 is the ASN.1 library used by GnuTLS, p11-kit and some other packages.

官网:http://www.gnu.org/software/libtasn1/

【yum安装】

yum install libtasn1

【rpm安装】

下载:https://pkgs.org/download/tasn1

yum install http://mirror.centos.org/centos/7/os/x86_64/Packages/libtasn1-4.10-1.el7.x86_64.rpm
yum install http://mirror.centos.org/centos/7/os/x86_64/Packages/libtasn1-devel-4.10-1.el7.x86_64.rpm
yum install http://mirror.centos.org/centos/7/os/x86_64/Packages/libtasn1-tools-4.10-1.el7.x86_64.rpm

【源码编译安装最新版本】

参考:http://linuxfromscratch.org/blfs/view/svn/general/libtasn1.html

下载:http://ftp.gnu.org/gnu/libtasn1/

最新版本:libtasn1-4.13

wget http://ftp.gnu.org/gnu/libtasn1/libtasn1-4.13.tar.gz && tar -xzvf libtasn1-4.13.tar.gz && cd libtasn1-4.13 && ./configure --prefix=/usr --disable-static && make && make install

输出:

...
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/lib
...
 /usr/bin/mkdir -p '/usr/include'
 /usr/bin/install -c -m 644 libtasn1.h '/usr/include'
 /usr/bin/mkdir -p '/usr/lib/pkgconfig'
 /usr/bin/install -c -m 644 libtasn1.pc '/usr/lib/pkgconfig'
...

更新系统动态连接库配置:

echo /usr/lib >> /etc/ld.so.conf && ldconfig

安装完成。

相关路径:

/usr/lib/libtasn1.so.6.5.2
/usr/include/libtasn1.h
/usr/lib/pkgconfig/libtasn1.pc

环境参数:

LIBTASN1_CFLAGS="-I/usr/include" LIBTASN1_LIBS="-L/usr/lib -ltasn1"

备注:

Installed Programs: asn1Coding, asn1Decoding and asn1Parser
Installed Library: libtasn1.so
Installed Directory: /usr/share/gtk-doc/html/libtasn1