ZerBea / hcxtools

A small set of tools to convert packets from capture files to hash files for use with Hashcat or John the Ripper.
MIT License
2.02k stars 392 forks source link

fatal error: openssl/sha.h: No such file or directory (misconfigured KALI distribution) #331

Closed RarefiedMars415 closed 9 months ago

RarefiedMars415 commented 9 months ago

i got a issue where hcxpcaptool is missing on wifite i have it installed but it still doesnt work when i try to do sudo make and then sudo make install i get this same error

cc -O3 -Wall -Wextra -std=gnu99 -MMD -MF .deps/hcxpcaptool.d -o hcxpcaptool hcxpcaptool.c -lz -lcrypto hcxpcaptool.c:16:10: fatal error: openssl/sha.h: No such file or directory 16 | #include <openssl/sha.h> | ^~~~~~~ compilation terminated. make: *** [Makefile:79: hcxpcaptool] Error 1

when i try to install the requirements (i was looking at fixes for it and i tried downloading the required items i got another error) i keep getting this

Reading package lists... Done Building dependency tree
Reading state information... Done zlib1g-dev is already the newest version (1:1.2.11.dfsg-2). zlib1g-dev set to manually installed. The following additional packages will be installed: curl libcurl4 libpcap0.8-dev Suggested packages: libcurl4-doc libidn11-dev libkrb5-dev libldap2-dev librtmp-dev libssh2-1-dev pkg-config libssl-doc The following NEW packages will be installed: libcurl4-openssl-dev libpcap-dev libpcap0.8-dev libssl-dev The following packages will be upgraded: curl libcurl4 2 upgraded, 4 newly installed, 0 to remove and 94 not upgraded. Need to get 3,083 kB of archives. After this operation, 10.5 MB of additional disk space will be used. Do you want to continue? [Y/n] y Err:1 http://http.kali.org/kali kali-rolling/main amd64 curl amd64 7.68.0-1+b1 404 Not Found [IP: ] Err:2 http://http.kali.org/kali kali-rolling/main amd64 libcurl4 amd64 7.68.0-1+b1 404 Not Found [IP: ] Err:3 http://http.kali.org/kali kali-rolling/main amd64 libcurl4-openssl-dev amd64 7.68.0-1+b1 404 Not Found [IP: ] Err:4 http://http.kali.org/kali kali-rolling/main amd64 libpcap0.8-dev amd64 1.9.1-4 404 Not Found [IP: ] Err:5 http://http.kali.org/kali kali-rolling/main amd64 libpcap-dev amd64 1.9.1-4 404 Not Found [IP: ] Err:6 http://http.kali.org/kali kali-rolling/main amd64 libssl-dev amd64 1.1.1g-1 404 Not Found [IP: ] E: Failed to fetch http://http.kali.org/kali/pool/main/c/curl/curl_7.68.0-1+b1_amd64.deb 404 Not Found [IP: ] E: Failed to fetch http://http.kali.org/kali/pool/main/c/curl/libcurl4_7.68.0-1+b1_amd64.deb 404 Not Found [IP: ] E: Failed to fetch http://http.kali.org/kali/pool/main/c/curl/libcurl4-openssl-dev_7.68.0-1+b1_amd64.deb 404 Not Found [IP: ] E: Failed to fetch http://http.kali.org/kali/pool/main/libp/libpcap/libpcap0.8-dev_1.9.1-4_amd64.deb 404 Not Found [IP: ] E: Failed to fetch http://http.kali.org/kali/pool/main/libp/libpcap/libpcap-dev_1.9.1-4_amd64.deb 404 Not Found [IP: ] E: Failed to fetch http://http.kali.org/kali/pool/main/o/openssl/libssl-dev_1.1.1g-1_amd64.deb 404 Not Found [IP: ] E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

(i removed the ip addresses because im new to kali linux so idk if theyre smth important or if i can let them be shown to you guys and from basic knowledge im not showing them)

if someone helps me get this solved id be very thankful (Even after doing that with the required items i still get the same error when i try the sudo make and sudo make install command

Jake-Grafton commented 9 months ago

The issue you are facing seems to stem from a problem with your internet connection. Try resetting your internet connection and then ping google.com to see if your DNS is working properly. From there, you can proceed with installing the required packages. Please read this article from askubuntu for more information.

ZerBea commented 9 months ago

First of all, I'm going to close this report, because all problems are related to KALI. This is an issue tracker and it is not a bug in hcxtools.

But to point you into the right direction: According to README.md the requirements of hcxtools are: * libopenssl (>= 3.0) and openssl-dev installed Your KALI version is misconfigured and it tries to get an old version (1.1.1g) of libssl: Err:6 http://http.kali.org/kali kali-rolling/main amd64 libssl-dev amd64 1.1.1g-1 According to KALI package tracker its actual version is 3.1.4-2: https://pkg.kali.org/news/568234/openssl-314-2-imported-into-kali-rolling/ Check your sources .list to figure out why KALI is not up to date. How to fix that: https://forums.kali.org/

Some addtional information can be found in the closed issue reports https://github.com/ZerBea/hcxtools/issues?q=is%3Aissue+is%3Aclosed and in the discussions section: https://github.com/ZerBea/hcxdumptool/discussions

BTW: KALI is absolutely not a distribution to be used by a beginner, because you're running into several problems like you mentioned above: https://www.kali.org/docs/introduction/should-i-use-kali-linux/

RarefiedMars415 commented 9 months ago

okay ill try that but when i try the sudo apt-get update command i get this same issue and also if im kinda annoying sorry.

Get:1 http://mirrors.netix.net/kali kali-rolling InRelease [41.5 kB] Err:1 http://mirrors.netix.net/kali kali-rolling InRelease The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository devel@kali.org Fetched 41.5 kB in 1s (53.3 kB/s) Reading package lists... Done W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://mirrors.netix.net/kali kali-rolling InRelease: The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository devel@kali.org W: Failed to fetch http://http.kali.org/kali/dists/kali-rolling/InRelease The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository devel@kali.org W: Some index files failed to download. They have been ignored, or old ones used instead.

ZerBea commented 9 months ago

Your KALI installation is completely broken. https://unix.stackexchange.com/questions/421821/invalid-signature-for-kali-linux-repositories-the-following-signatures-were-i

ZerBea commented 9 months ago

Please comment output of uname -r

RarefiedMars415 commented 9 months ago

this is the output i got 5.7.0-kali1-amd64

ZerBea commented 9 months ago

That is a really old version and the kernel is no longer under maintenance: https://www.kernel.org/

According to KALI history: https://www.kali.org/releases/ your version is outdated since 2020: Kali 2020.3 - 18th August, 2020 - The third [2020 Kali Rolling release](https://www.kali.org/blog/kali-linux-2020-3-release/). Kernel 5.7.0, Xfce 4.14.4.

None of the requirements of hcxtools (as mentioned in README.md) are met.

RarefiedMars415 commented 9 months ago

i need to reinstall kali or is there a better way?

ZerBea commented 9 months ago

A fresh install is the easiest way.