Wednesday, December 2, 2015

Fedora / Redhat - Pixie fatal error: openssl/sha.h (FIXED)

I tried to compile PixieWPS, but openSSL library are missing
$ cd src
$ make
cc -std=c99 -O3 -Wno-deprecated-declarations -o pixiewps pixiewps.c random_r.c -lcrypto
In file included from pixiewps.c:51:0:
pixiewps.h:66:25: fatal error: openssl/sha.h: No such file or directory
compilation terminated.
Makefile:11: recipe for target 'all' failed
make: *** [all] Error 1

Debian family call this library package as libssl-dev, but in RHEL family side, it's called as openssl-devel.
$ sudo dnf install openssl-devel
Last metadata expiration check performed 2:52:30 ago on Wed Dec  2 14:43:05 2015.
Dependencies resolved.
========================================================================================================================================================================
 Package                                        Arch                              Version                                      Repository                          Size
========================================================================================================================================================================
Installing:
 keyutils-libs-devel                            x86_64                            1.5.9-7.fc23                                 fedora                              45 k
 krb5-devel                                     x86_64                            1.14-2.fc23                                  updates                            649 k
 libcom_err-devel                               x86_64                            1.42.13-3.fc23                               fedora                              35 k
 libselinux-devel                               x86_64                            2.4-4.fc23                                   fedora                             182 k
 libsepol-devel                                 x86_64                            2.4-1.fc23                                   fedora                              77 k
 libverto-devel                                 x86_64                            0.2.6-5.fc23                                 fedora                              16 k
 openssl-devel                                  x86_64                            1:1.0.2d-3.fc23                              updates                            1.5 M
 pcre-devel                                     x86_64                            8.38-2.fc23                                  updates                            540 k
 zlib-devel                                     x86_64                            1.2.8-9.fc23                                 fedora                              55 k
Upgrading:
 krb5-libs                                      x86_64                            1.14-2.fc23                                  updates                            839 k

Transaction Summary
========================================================================================================================================================================
Install  9 Packages
Upgrade  1 Package

Total download size: 3.9 M
Is this ok [y/N]: y

Now I can compile PixieWPS without error anymore :)

$ make
cc -std=c99 -O3 -Wno-deprecated-declarations -o pixiewps pixiewps.c random_r.c -lcrypto
$ sudo make install 
rm -f /usr/local/bin/pixiewps
install pixiewps /usr/bin/pixiewps
install -m 755 pixiewps /usr/bin

1 comment:

  1. Good post. Thank you for sharing. I long time not used C +. Probably entrust this job to my son, he loves the C +. If there are problems with dll, here is the solution http://fix4dll.com/d3dx9_39_dll. I could not run more than one software, then I downloaded fixes dll files. Everything worked out. Perhaps in handy.

    ReplyDelete