sslscan.c:94:25: fatal error: openssl/err.h: No such file or directory compilation terminated. #163

sslscan.c:94:25: fatal error: openssl/err.h: No such file or directory compilation terminated. #163

我需要在 ubuntu 虚拟机 (virtualbox) 中安装 sslscan ssl 扫描工具 (from here)。

按照他们提供的安装说明进行操作 here, I installed openssl-chacha from here。请注意,我知道这个 openssl 的分支包含弱密码(我使用该工具和 openssl 用于测试扫描目的,而不是真正的应用程序)。

然后,安装上面的openssl后,我做的第一件事就是执行:make。请注意,我不清楚何时使用他 sslscan 提到的这些命令 here(我没有执行它们)。但是我想用openssl的chacha版本:

apt-get install build-essential git zlib1g-dev
apt-get build-dep openssl
make static

当我尝试 运行 命令时:make 我得到这个错误:

make: git: Command not found
cc -o sslscan -Wall -Wformat=2 -Wformat-security -pie -z relro -z now -L/usr/local/lib -L/usr/local/ssl/lib -L/usr/local/opt/openssl/lib -L/opt/local/lib -D_FORTIFY_SOURCE=2 -fstack-protector-all -fPIE -I/usr/local/include -I/usr/local/ssl/include -I/usr/local/ssl/include/openssl -I/usr/local/opt/openssl/include -I/opt/local/include -I/opt/local/include/openssl  -DVERSION=\"1.11.11\" sslscan.c -lssl -lcrypto -ldl
/usr/bin/ld: /usr/local/ssl/lib/libssl.a(s2_clnt.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/local/ssl/lib/libssl.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile:91: recipe for target 'sslscan' failed
make: *** [sslscan] Error 1

我在这个目录中:/home/myuser/Downloads/sslscan-master 我确保 openssl 在: /usr/local/ssl 你能指出我缺少什么吗?我不熟悉 Linux 系统(Windows 用户),但我更喜欢使用 Linux 中的工具。因此,我将感谢您的帮助和耐心等待。

make: git: Command not found

因此,首先安装 git 命令:

 apt-get install git

(或者 git-core