Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fatal error: openssl/sha.h: No such file or directory #96

Closed
mhzsuraj22 opened this issue Jun 6, 2019 · 11 comments
Closed

fatal error: openssl/sha.h: No such file or directory #96

mhzsuraj22 opened this issue Jun 6, 2019 · 11 comments

Comments

@mhzsuraj22
Copy link

No description provided.

@mhzsuraj22
Copy link
Author

While installing hcxtools it says the following 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
#include <openssl/sha.h>
^~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:79: hcxpcaptool] Error 1

also icant seem to install any other package required like
libopenssl
openssl-dev
libcurl

@ZerBea
Copy link
Owner

ZerBea commented Jun 6, 2019

Which distribution do you run?
In case of debian based distribution (KALI, UBUNTU) you must install the dev packages!

If you need more informations, follow this issue here:
#55

or check the README:
Requirements
Linux (recommended Arch Linux, but other distros should work, too (no support for other distributions).
libopenssl and openssl-dev installed
librt and librt-dev installed (should be installed by default)
zlib and zlib-dev installed (for gzip compressed cap/pcap/pcapng files)
libcurl and curl-dev installed (used by whoismac and wlancap2wpasec)
libpthread and pthread-dev installed (used by hcxhashcattool)
To install requirements on Kali use the following 'apt-get install libcurl4-openssl-dev libssl-dev zlib1g-dev'

Or just do a google search. For example: "debian openssl/sha.h: No such file or directory"
https://unix.stackexchange.com/questions/87458/make-fatal-error-openssl-sha-h-no-such-file-or-directory

BTW:
I closed this issue, because it isn't a hcxtools issue.
Of course, you can comment further questions here, if you need help.

@ZerBea ZerBea closed this as completed Jun 6, 2019
@ZerBea ZerBea changed the title cant run hcxtools fatal error: openssl/sha.h: No such file or directory Jun 6, 2019
@mhzsuraj22
Copy link
Author

I am running on kali Linux 2019.2
But I cant seem to install those packages
So would you be kind enough to send me the kali repositories. Bcoz mine doesn't seem to work
As it cant locate those mentioned packages.

@ZerBea
Copy link
Owner

ZerBea commented Jun 6, 2019

Did you run:
$ apt get update
$ apt-get upgrade
$ apt-get install libcurl4-openssl-dev libssl-dev zlib1g-dev

BTW:
I can't send you the KALI repositories, because this is the world of Arch Linux here.

You can find the kali Linux Package Tracker here:
https://pkg.kali.org/

for example search for openssl:
https://pkg.kali.org/pkg/openssl

It is possible that KALI changed the name of the Package:
https://forums.kali.org/showthread.php?35011-Issues-with-libssl-John-the-Ripper

@mhzsuraj22
Copy link
Author

Yeah I ran all the commnds
All came positive except for that last one
It just cant locate the package
Anyways thanks
I will try more and reply if I found the answer
Thank you so much for the quick response

@ZerBea
Copy link
Owner

ZerBea commented Jun 6, 2019

Also I recommend to read this here, if you are a Linux beginner:
https://itsfoss.com/kali-linux-review/

@ZerBea
Copy link
Owner

ZerBea commented Jun 6, 2019

Ok, please post the error message from apt.
It looks like a typical KALI issue, because we have more than one issue report here:
#93
#57
#56

Maybe I need to update the REAME, because KALI change the package names (again).

@ZerBea
Copy link
Owner

ZerBea commented Jun 6, 2019

Both tools came up with KALI:
https://pkg.kali.org/pkg/hcxtools
https://pkg.kali.org/pkg/hcxdumptool

@ZerBea ZerBea mentioned this issue Feb 15, 2020
@DarioMorariu
Copy link

I'm having the exact same problem. I'm using a pwnagotchi.

@ZerBea
Copy link
Owner

ZerBea commented Feb 29, 2024

@DarioMorariu
Provided that you're running the latest release v1.5.5:
https://github.com/evilsocket/pwnagotchi/releases/tag/v1.5.5
You should know that the underlying OS (Raspbian lite - based on Debian) is old (Apr 18, 2021).

Latest Raspbian lite version is Bookworm (Debian 12) with release date: December 11th 2023)
https://www.raspberrypi.com/software/operating-systems/

As mentioned in README.md section requirements, you need libopenssl >= 3.0 to compile hcxtools.
* libopenssl (>= 3.0) and openssl-dev installed

This version is provided by Bookworm:
https://packages.debian.org/bookworm/openssl

Older versions, e.g. Bullseye provide version 1.1.1w only:
https://packages.debian.org/bullseye/openssl
Due to missing functions, you can't compile hcxtools running this old library.

You now have two options:
update to bookworm
or
compile openssl by yourself (I do not recommend this, because you will end up in a dependency hell)
https://www.openssl.org/

BTW:
According to this the pwnagotchi recommended hardware is a Raspberry Pi 0 W:
https://pwnagotchi.org/getting-started/suggested-working-hardware/index.html

I suggest to take a look at OpenWRT:
https://openwrt.org/
https://openwrt.org/packages/pkgdata/hcxtools
https://openwrt.org/packages/pkgdata/hcxdumptool

You can build a test image via the firmware selector:
https://firmware-selector.openwrt.org/?version=23.05.2&target=bcm27xx%2Fbcm2708&id=rpi

@ZerBea
Copy link
Owner

ZerBea commented Mar 1, 2024

Also you should know that Debian (and its clones like Raspbain, UBUNTU, KALI, ...) does not install a development environment by default!

If you decide to compile tools, it is mandatory to install the development environment, the development tools, the header files (-dev packages) and the libraries (linked by hcxtools).
If this environment is missing (not installed or incomplete), you'll end up in an ERROR like this one:
fatal error: openssl/sha.h: No such file or directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants