+ wget -t 3 -T 30 -q -O libreswan-4.12.tar.gz https://github.com/libreswan/libreswan/archive/v4.12.tar.gz
## Compiling and installing Libreswan, please wait...
+ make -j5 -s base
/opt/src/libreswan-4.12/programs/pluto/fetch.c:56:10: fatal error: curl/curl.h: No such file or directory
56 | #include <curl/curl.h> /* rpm:libcurl-devel dep:libcurl4-nss-dev */
| ^~~~~~~~~~~~~
compilation terminated.
make[3]: *** [../../mk/rules.mk:63: fetch.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [../../mk/targets.mk:69: base] Error 2
make[1]: *** [../mk/targets.mk:69: recursive-base] Error 2
make: *** [/opt/src/libreswan-4.12/mk/targets.mk:69: recursive-base] Error 2
Error: Libreswan 4.12 failed to build.
┌──(root㉿kali-raspberry-pi)-[/data/sh]
└─# apt install libcurl-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package libcurl-dev is a virtual package provided by:
libcurl4-nss-dev 7.64.0-4+deb10u2
libcurl4-openssl-dev 8.3.0-3
libcurl4-gnutls-dev 8.3.0-3
You should explicitly select one to install.
E: Package 'libcurl-dev' has no installation candidate
┌──(root㉿kali-raspberry-pi)-[/data/sh]
└─# apt install libcurl4-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package libcurl4-dev is a virtual package provided by:
libcurl4-nss-dev 7.64.0-4+deb10u2
libcurl4-openssl-dev 8.3.0-3
libcurl4-gnutls-dev 8.3.0-3
You should explicitly select one to install.
E: Package 'libcurl4-dev' has no installation candidate
┌──(root㉿kali-raspberry-pi)-[/data/sh]
└─# apt install libcurl4-nss-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libcurl4-nss-dev : Depends: libcurl3-nss (= 7.64.0-4+deb10u2) but 7.88.1-11 is to be installed
E: Unable to correct problems, you have held broken packages.
对于 Raspberry Pi 树莓派,本项目支持 Raspberry Pi OS 和 Ubuntu 系统。树莓派上的 Kali Linux 系统目前不支持。使用离线安装脚本并不能解决 Kali 镜像仓库源中没有 libcurl4-nss-dev 软件包的问题。如果要搭建 IPsec VPN 服务器,建议你换用比如 Raspberry Pi OS。
当前脚本引用了很多需要在线下载安装的包,例如libreswan、libcurl4-nss-dev等等,而且多是github.com等站点的下载链接。
而国内环境是封了github.com链接的,这就导致出现死循环:安装vpn是为了访问github.com等站点,而安装vpn又需要先访问github.com…… 每次都为了解决这个死循环问题折腾好久。
此外,因为官方软件仓库更新的问题,很多apt在线下载回来的包并不完全兼容,甚至缺少这些包。
例如:树莓派上的kali镜像仓库源中并没有libcurl4-nss-dev这个包,而强行安装debian中的 libcurl4-nss-dev,却又依赖libcurl3-nss (= 7.64.0-4+deb10u2),但是系统自带的却是7.88.1-11版
……
每次重装系统后使用脚本重新安装vpn时都为了解决这些死循环、兼容性、依赖关系费好大功夫,甚至比不用这个安装脚本、直接手动配置更加麻烦。
希望大佬出一个可以本地安装的版本,至少可以先检测本地是否有这些需要从github等站点下载的包,如果本地有这些包就不要再联网从github下载了(这样至少可以通过其他途径先把依赖包下载到本地,然后直接从本地安装,而不是强行再联网处理)