在 Ubuntu 18.04.5 上安装 Wireguard
内核是:
uname -r
4.15.0
当我检查时
# dkms status
wireguard, 1.0.20201112: added
尝试构建 Wireguard:
dkms build wireguard/1.0.20200506
给出以下日志:
DKMS make.log for wireguard-1.0.20201112 for kernel 4.15.0-140-generic (x86_64)
Fri Apr 9 07:32:49 UTC 2021
make: Entering directory '/usr/src/linux-headers-4.15.0-140-generic'
CC [M] /var/lib/dkms/wireguard/1.0.20201112/build/main.o
CC [M] /var/lib/dkms/wireguard/1.0.20201112/build/noise.o
CC [M] /var/lib/dkms/wireguard/1.0.20201112/build/device.o
CC [M] /var/lib/dkms/wireguard/1.0.20201112/build/peer.o
CC [M] /var/lib/dkms/wireguard/1.0.20201112/build/timers.o
CC [M] /var/lib/dkms/wireguard/1.0.20201112/build/queueing.o
CC [M] /var/lib/dkms/wireguard/1.0.20201112/build/send.o
CC [M] /var/lib/dkms/wireguard/1.0.20201112/build/receive.o
CC [M] /var/lib/dkms/wireguard/1.0.20201112/build/socket.o
CC [M] /var/lib/dkms/wireguard/1.0.20201112/build/peerlookup.o
CC [M] /var/lib/dkms/wireguard/1.0.20201112/build/allowedips.o
CC [M] /var/lib/dkms/wireguard/1.0.20201112/build/ratelimiter.o
CC [M] /var/lib/dkms/wireguard/1.0.20201112/build/cookie.o
CC [M] /var/lib/dkms/wireguard/1.0.20201112/build/netlink.o
CC [M] /var/lib/dkms/wireguard/1.0.20201112/build/crypto/zinc/chacha20/chacha20.o
PERLASM /var/lib/dkms/wireguard/1.0.20201112/build/crypto/zinc/chacha20/chacha20-x86_64.S
AS [M] /var/lib/dkms/wireguard/1.0.20201112/build/crypto/zinc/chacha20/chacha20-x86_64.o
CC [M] /var/lib/dkms/wireguard/1.0.20201112/build/crypto/zinc/poly1305/poly1305.o
PERLASM /var/lib/dkms/wireguard/1.0.20201112/build/crypto/zinc/poly1305/poly1305-x86_64.S
AS [M] /var/lib/dkms/wireguard/1.0.20201112/build/crypto/zinc/poly1305/poly1305-x86_64.o
CC [M] /var/lib/dkms/wireguard/1.0.20201112/build/crypto/zinc/chacha20poly1305.o
CC [M] /var/lib/dkms/wireguard/1.0.20201112/build/crypto/zinc/blake2s/blake2s.o
AS [M] /var/lib/dkms/wireguard/1.0.20201112/build/crypto/zinc/blake2s/blake2s-x86_64.o
CC [M] /var/lib/dkms/wireguard/1.0.20201112/build/crypto/zinc/curve25519/curve25519.o
gcc: internal compiler error: Killed (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
scripts/Makefile.build:330: recipe for target '/var/lib/dkms/wireguard/1.0.20201112/build/crypto/zinc/curve25519/curve25519.o' failed
make[1]: *** [/var/lib/dkms/wireguard/1.0.20201112/build/crypto/zinc/curve25519/curve25519.o] Error 4
make[1]: *** Deleting file '/var/lib/dkms/wireguard/1.0.20201112/build/crypto/zinc/curve25519/curve25519.o'
Makefile:1590: recipe for target '_module_/var/lib/dkms/wireguard/1.0.20201112/build' failed
make: *** [_module_/var/lib/dkms/wireguard/1.0.20201112/build] Error 2
make: Leaving directory '/usr/src/linux-headers-4.15.0-140-generic'
我不知道如何解决这个问题。我成功地在本地 ubuntu 18.04 上安装了 wireguard,没有任何问题,但在 VPS 上却无法安装。