Home Man
Search
Today's Posts
Register

Post questions about C, C++, Java, SQL, and other programming languages here.

Fatal error: mcrypt.h: No such file or directory

Tags
c programming language, programming, solved

Login to Reply

 
Thread Tools Search this Thread
# 1  
Old 10-26-2015
Fatal error: mcrypt.h: No such file or directory

Hi All,

I am trying to include a mcrypt.h header but I am getting the below error:

Code:
test01> gcc test1.c

test1.c:5:20: fatal error: mcrypt.h: No such file or directory
 #include <mcrypt.h>
                    ^
compilation terminated.

As I cannot put my encryption program here, so have put a sample code which I ran :

Code:
/* Hello World program */

#include<stdio.h>

#include <mcrypt.h>


main()
{
    printf("Hello World");

}

libmcrypt is installed as below in UNIX

Code:
lrwxrwxrwx    1 root     system           43 14 Jul 16:29 libmcrypt.so.4.4.8 -> ../../opt/freeware/lib64/libmcrypt.so.4.4.8

lrwxrwxrwx    1 root     system           39 14 Jul 16:29 libmcrypt.so.4 -> ../../opt/freeware/lib64/libmcrypt.so.4

lrwxrwxrwx    1 root     system           37 14 Jul 16:29 libmcrypt.so -> ../../opt/freeware/lib64/libmcrypt.so

lrwxrwxrwx    1 root     system           34 14 Jul 16:29 libmcrypt -> ../../opt/freeware/lib64/libmcrypt

Thanks in ADVANCE.


Moderator's Comments:
Fatal error: mcrypt.h: No such file or directory Use code tags, thanks.

Last edited by zaxxon; 10-26-2015 at 08:47 AM.. Reason: code tags
# 2  
Old 10-26-2015
You will have to install the package libmcrypt-dev as it provides mcrypt.h.
The Following User Says Thank You to zaxxon For This Useful Post:
Shre (10-26-2015)
# 3  
Old 10-26-2015
Hi Zaxxon,

Thank you for your reply.

But as I have mentioned, libmcrypt is already installed :

Code:
lrwxrwxrwx    1 root     system           43 14 Jul 16:29 libmcrypt.so.4.4.8 -> ../../opt/freeware/lib64/libmcrypt.so.4.4.8

lrwxrwxrwx    1 root     system           39 14 Jul 16:29 libmcrypt.so.4 -> ../../opt/freeware/lib64/libmcrypt.so.4

lrwxrwxrwx    1 root     system           37 14 Jul 16:29 libmcrypt.so -> ../../opt/freeware/lib64/libmcrypt.so

lrwxrwxrwx    1 root     system           34 14 Jul 16:29 libmcrypt -> ../../opt/freeware/lib64/libmcrypt

Let me know if I am wrong, as I am new bee in C programming.

Thanks.
# 4  
Old 10-26-2015
*shrug* All right, you're wrong. You need to install libmcrypt-dev, too.

Most binary distributions split packages into two parts, those needed to compile with them, and those needed to just use them. I consider this a bad habit inherited from the 90's when hard drive space was at a premium, not really necessary now in most situations.
The Following User Says Thank You to Corona688 For This Useful Post:
Shre (10-26-2015)
# 5  
Old 10-26-2015
Thanks Zaxxon and Corona688. It worked.:-)
The Following User Says Thank You to Shre For This Useful Post:
Corona688 (10-26-2015)
Login to Reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Install Apache 2.4.20 on Solaris 10 --- Error "ld: fatal: file ab.o: wrong ELF class: ELFCLASS32" jhuang Solaris 0 04-28-2016 10:38 AM
./curl -V showing fatal: libldap.so.5: open failed: No such file or directory manalisharmabe Solaris 9 08-07-2013 04:55 AM
fatal error: stdio.h: No such file or directory Fingerz Solaris 2 10-22-2012 03:09 PM
help with email to be triggered based on fatal error detection from batch run log file neded zico1986 Shell Programming and Scripting 1 09-06-2011 02:51 PM
fatal: cannot open file `TNAME' for reading (No such file or directory) kunwar Shell Programming and Scripting 1 03-11-2011 07:03 PM
Error- ld.so.1: expr: fatal: libgmp.so.3: open failed:No such file or directory Hari_Ganesh Solaris 2 07-16-2009 05:52 AM
configure php with mcrypt support pupp Shell Programming and Scripting 1 10-11-2008 01:03 PM
ld: fatal error betterdayz Programming 2 11-01-2006 09:47 AM
Fatal Error sarwan Programming 1 05-10-2006 10:21 AM
ld: fatal error ppass Programming 1 01-07-2005 11:32 AM


All times are GMT -4. The time now is 05:57 AM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
UNIX.COM Login
Username:
Password:  
Show Password