quericy / one-key-ikev2-vpn

A bash script base on Centos or Ubuntu help you to create IKEV2/L2TP vpn.
GNU General Public License v3.0
2.1k stars 709 forks source link

执行脚本报错 #174

Open gwyzj opened 5 years ago

gwyzj commented 5 years ago

你好,我按顺序执行,但是编译strongewans报错,VPS是Ubuntu 18.04 LTS (GNU/Linux 4.15.0-20-generic x86_64),下面是报错日志 In file included from utils/utils.h:54:0, from library.h:101, from library.c:17: utils/utils/memory.h: In function ‘memwipe_inline’: utils/utils/memory.h:99:15: error: ‘uintptr_t’ undeclared (first use in this function); did you mean ‘intptr_t’? for (i = 0; (uintptr_t)&c[i] % sizeof(long) && i < n; i++) ^~~~~ intptr_t utils/utils/memory.h:99:15: note: each undeclared identifier is reported only once for each function it appears in Makefile:1918: recipe for target 'library.lo' failed make[5]: [library.lo] Error 1 make[5]: Leaving directory '/root/strongswan-5.5.1/src/libstrongswan' Makefile:2004: recipe for target 'all-recursive' failed make[4]: [all-recursive] Error 1 make[4]: Leaving directory '/root/strongswan-5.5.1/src/libstrongswan' Makefile:1149: recipe for target 'all' failed make[3]: [all] Error 2 make[3]: Leaving directory '/root/strongswan-5.5.1/src/libstrongswan' Makefile:519: recipe for target 'all-recursive' failed make[2]: [all-recursive] Error 1 make[2]: Leaving directory '/root/strongswan-5.5.1/src' Makefile:579: recipe for target 'all-recursive' failed make[1]: [all-recursive] Error 1 make[1]: Leaving directory '/root/strongswan-5.5.1' Makefile:488: recipe for target 'all' failed make: [all] Error 2 make install-recursive make[1]: Entering directory '/root/strongswan-5.5.1' Making install in src make[2]: Entering directory '/root/strongswan-5.5.1/src' Making install in . make[3]: Entering directory '/root/strongswan-5.5.1/src' make[4]: Entering directory '/root/strongswan-5.5.1/src' make[4]: Nothing to be done for 'install-exec-am'. make[4]: Nothing to be done for 'install-data-am'. make[4]: Leaving directory '/root/strongswan-5.5.1/src' make[3]: Leaving directory '/root/strongswan-5.5.1/src' Making install in include make[3]: Entering directory '/root/strongswan-5.5.1/src/include' make[4]: Entering directory '/root/strongswan-5.5.1/src/include' make[4]: Nothing to be done for 'install-exec-am'. make[4]: Nothing to be done for 'install-data-am'. make[4]: Leaving directory '/root/strongswan-5.5.1/src/include' make[3]: Leaving directory '/root/strongswan-5.5.1/src/include' Making install in libstrongswan make[3]: Entering directory '/root/strongswan-5.5.1/src/libstrongswan' make install-recursive make[4]: Entering directory '/root/strongswan-5.5.1/src/libstrongswan' Making install in . make[5]: Entering directory '/root/strongswan-5.5.1/src/libstrongswan' depbase=echo library.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||';\ /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../../src/libstrongswan -DIPSEC_DIR=\"/usr/local/libexec/ipsec\" -DIPSEC_LIB_DIR=\"/usr/local/lib/ipsec\" -DPLUGINDIR=\"/usr/local/lib/ipsec/plugins\" -DSTRONGSWAN_CONF=\"/usr/local/etc/strongswan.conf\" -g -O2 -Wall -Wno-format -Wno-format-security -Wno-pointer-sign -include /root/strongswan-5.5.1/config.h -MT library.lo -MD -MP -MF $depbase.Tpo -c -o library.lo library.c &&\ mv -f $depbase.Tpo $depbase.Plo libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../../src/libstrongswan -DIPSEC_DIR=\"/usr/local/libexec/ipsec\" -DIPSEC_LIB_DIR=\"/usr/local/lib/ipsec\" -DPLUGINDIR=\"/usr/local/lib/ipsec/plugins\" -DSTRONGSWAN_CONF=\"/usr/local/etc/strongswan.conf\" -g -O2 -Wall -Wno-format -Wno-format-security -Wno-pointer-sign -include /root/strongswan-5.5.1/config.h -MT library.lo -MD -MP -MF .deps/library.Tpo -c library.c -fPIC -DPIC -o .libs/library.o In file included from utils/utils.h:54:0, from library.h:101, from library.c:17: utils/utils/memory.h: In function ‘memwipe_inline’: utils/utils/memory.h:99:15: error: ‘uintptr_t’ undeclared (first use in this function); did you mean ‘intptr_t’? for (i = 0; (uintptr_t)&c[i] % sizeof(long) && i < n; i++) ^~~~~ intptr_t utils/utils/memory.h:99:15: note: each undeclared identifier is reported only once for each function it appears in Makefile:1918: recipe for target 'library.lo' failed make[5]: [library.lo] Error 1 make[5]: Leaving directory '/root/strongswan-5.5.1/src/libstrongswan' Makefile:2004: recipe for target 'install-recursive' failed make[4]: [install-recursive] Error 1 make[4]: Leaving directory '/root/strongswan-5.5.1/src/libstrongswan' Makefile:2161: recipe for target 'install' failed make[3]: [install] Error 2 make[3]: Leaving directory '/root/strongswan-5.5.1/src/libstrongswan' Makefile:519: recipe for target 'install-recursive' failed make[2]: [install-recursive] Error 1 make[2]: Leaving directory '/root/strongswan-5.5.1/src' Makefile:579: recipe for target 'install-recursive' failed make[1]: [install-recursive] Error 1 make[1]: Leaving directory '/root/strongswan-5.5.1' Makefile:876: recipe for target 'install' failed make: [install] Error 2 ./one-key-ikev2.sh: line 330: ipsec: command not found ./one-key-ikev2.sh: line 331: ipsec: command not found ./one-key-ikev2.sh: line 332: ipsec: command not found ./one-key-ikev2.sh: line 333: ipsec: command not found ./one-key-ikev2.sh: line 333: ipsec: command not found ./one-key-ikev2.sh: line 337: ipsec: command not found ./one-key-ikev2.sh: line 338: ipsec: command not found ./one-key-ikev2.sh: line 338: ipsec: command not found configure the pkcs12 cert password(Can be empty): unable to load private key 139728073454016:error:0909006C:PEM routines:get_name:no start line:../crypto/pem/pem_lib.c:745:Expecting: ANY PRIVATE KEY #################################### cp: cannot create regular file '/usr/local/etc/ipsec.d/cacerts/': No such file or directory cp: cannot create regular file '/usr/local/etc/ipsec.d/certs/': No such file or directory cp: cannot create regular file '/usr/local/etc/ipsec.d/private/': No such file or directory cp: cannot create regular file '/usr/local/etc/ipsec.d/certs/': No such file or directory cp: cannot create regular file '/usr/local/etc/ipsec.d/private/': No such file or directory

3c commented 5 years ago

试一下最新的strongwan , 在脚本中把 5.5.1 改成 5.8.0

8ar10der commented 5 years ago

问题重现,更改脚本中strongswan版本解决问题。

8ar10der commented 5 years ago

并且需要修改 /usr/local/etc/strongswan.conf 文件来适应新版本

参照 https://blog.csdn.net/qq_39511059/article/details/90609798