本文主要是介绍strongSwan的编译安装,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
基于全新安装的ubuntu 18.04系统。
# cat /etc/issue
Ubuntu 18.04.1 LTS \n \l
首先安装必要的编译工具:
# apt-get update
# apt-get install build-essential
# apt-get install autoconf
如果没有显示的禁用GNU MP(libgmp)加密插件,需要安装libgmp库,GMP插件目前是默认启用的。
# apt-get install libgmp-dev
安装strongSwan编译需要用到的工具,Makefile将使用一下工具生成部分C语言文件,所以必须要configure之前安装这些工具,以免Makefile找不到这些工具的路径。
# apt-get install gperf
# apt-get install flex
# apt-get install bison
例如src/starter/Makefile,如果系统没有gperf工具,configure生成的Makefile文件中GPERF变量为空,导致keywords.c文件为空文件。可在安装gperf之后,重新configure一下,另外要删除之前产生的keywords.c空文件。
GPERF = /usr/bin/gperfkeywords.c: $(srcdir)/keywords.txt keywords.h$(AM_V_GEN) \$(GPERF) -m 10 -C -G -D -t < $(srcdir)/keywords.txt > $@
克隆clone代码:
$ git clone git://git.strongswan.org/strongswan.git
采用默认的configure,不加选项:
$ ./configure
strongSwan will be built with the following plugins
-----------------------------------------------------
libstrongswan: aes des rc2 sha2 sha1 md5 mgf1 random nonce x509 revocation constraints pubkey pkcs1 pkcs7 pkcs8 pkcs12 pgp dnskey sshkey pem fips-prf gmp curve25519 xcbc cmac hmac
libcharon: attr kernel-netlink resolve socket-default stroke vici updown xauth-generic counters
libtnccs:
libtpmtss:
最后执行编译安装
$ make install
这篇关于strongSwan的编译安装的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!