rssnsj / minivtun

A fast, secure and reliable VPN service based on non-standard protocol
GNU General Public License v3.0
246 stars 102 forks source link

failed to compile on debian 9 #14

Open tonyshaoxu opened 6 years ago

tonyshaoxu commented 6 years ago

Debian 9 Linux version 4.9.0-3-amd64 (debian-kernel@lists.debian.org) (gcc version 6.3.0 20170516 (Debian 6.3.0-18) ) #1 SMP Debian 4.9.30-2+deb9u2 (2017-06-26)

user@debian:~/minivtun/src$ make cc -Wall -c -o library.o library.c library.c: In function ‘datagram_encrypt’: library.c:74:17: error: storage size of ‘ctx’ isn’t known EVP_CIPHER_CTX ctx; ^~~ library.c:74:17: warning: unused variable ‘ctx’ [-Wunused-variable] library.c: In function ‘datagram_decrypt’: library.c:97:17: error: storage size of ‘ctx’ isn’t known EVP_CIPHER_CTX ctx; ^~~ library.c:97:17: warning: unused variable ‘ctx’ [-Wunused-variable] Makefile:19: recipe for target 'library.o' failed make: *** [library.o] Error 1


I also copied a compiled minivtun from other Linux distro, and tried to run on debian 9, unfortunately it also failed. user@debian:~/minivtun$ ./minivtun -h ./minivtun: error while loading shared libraries: libcrypto.so.10: cannot open shared object file: No such file or directory

boytm commented 6 years ago

debian 9 上的 openssl 是版本 1.1 对吧? 在 1.1 里面把结构体都隐藏了,必须改用 指针的方式。 你用 openssl 1.0 的版本重新编译下就行了