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


 
Thread Tools Search this Thread
Top Forums Programming Fatal error: mcrypt.h: No such file or directory
# 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:
Mod Comment Use code tags, thanks.

Last edited by zaxxon; 10-26-2015 at 09:47 AM.. Reason: code tags
# 2  
Old 10-26-2015
You will have to install the package libmcrypt-dev as it provides mcrypt.h.
This User Gave Thanks to zaxxon For This Post:
# 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. Smilie 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.
This User Gave Thanks to Corona688 For This Post:
# 5  
Old 10-26-2015
Thanks Zaxxon and Corona688. It worked.:-)
This User Gave Thanks to Shre For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Fatal error: 'Xm/Xm.h' file not found , motif installed

Hello, i have installed open-motif -2.3.8_1 X11 Toolkit on freebsd32bit machine. wanna compile a little script. script is ok. already compiled on other machine (linux) the message is as follows cc -o button button.c -lXm -lXt -lX11 button.c:3:10: fatal error: 'Xm/Xm.h' file not found... (5 Replies)
Discussion started by: Sennenmut
5 Replies

2. What is on Your Mind?

PHP Fatal Errors During SSL Cert Management - PHP Fatal error: xc_fcntl_mutex failed

Today, I noticed some errors in our SSL cert renewal log files, mostly related to domains where the IP address had changed. Concerned about this, rebuilt out SSL cert, which normally goes well without a hiccup. However, for today, for some reason which I cannot explain, there was a PHP error... (0 Replies)
Discussion started by: Neo
0 Replies

3. Solaris

Install Apache 2.4.20 on Solaris 10 --- Error "ld: fatal: file ab.o: wrong ELF class: ELFCLASS32"

I am following the "Compilling and Installing" guide from Apache > HTTP Server > Documentation > Version 2.4 page The configure running OK: # export CC="gcc -m64" # ./configure \ --prefix=/usr/local/apache2/httpd-2.4.20 \ --with-port=80 \ --with-mpm=worker \ --enable-mods-shared=most \... (0 Replies)
Discussion started by: jhuang
0 Replies

4. Solaris

./curl -V showing fatal: libldap.so.5: open failed: No such file or directory

Hi Guys, I am facing this Error bash-2.03$ ./curl -V ld.so.1: curl: fatal: libldap.so.5: open failed: No such file or directory Killed bash-2.03$ while executing ./curl -V in /opt/sfw/bin directory. I am using Sun Solaris 10. which package upgrage can give me this missing... (9 Replies)
Discussion started by: manalisharmabe
9 Replies

5. Solaris

fatal error: stdio.h: No such file or directory

Trying to compile a C program recievin this hello.c:1:19: fatal error: stdio.h: No such file or directory gcc is installed on the system. echo $PATH /usr/bin:/usr/sbin:/usr/gcc/4.5/include/c++/4.5.2/tr1 root@Sol11swtb01:/media/NO NAME/Programming/C/Testing# cd... (2 Replies)
Discussion started by: Fingerz
2 Replies

6. Shell Programming and Scripting

help with email to be triggered based on fatal error detection from batch run log file neded

Hi, I require need help in two aspects actually: 1) Fatal error that gets generated as %F% from a log file say ABClog.dat to trigger a mail. At present I manually grep the log file as <grep %F% ABClog.dat| cut-d "%" -f1>. The idea is to use this same logic to grep the log file which is... (1 Reply)
Discussion started by: zico1986
1 Replies

7. Shell Programming and Scripting

fatal: cannot open file `TNAME' for reading (No such file or directory)

Hi, I am running this command through a shell script and getting the error mentioned in the subject line: testing.awk -f x.txt TNAME My testing.awk file contains something like ++++++++++++++++++ #!/usr/bin/awk -f BEGIN{ TAB_NAME="INSERT_ONE_" ARGV ; } if ( $1=="JAM_ONE" &&... (1 Reply)
Discussion started by: kunwar
1 Replies

8. Solaris

Error- ld.so.1: expr: fatal: libgmp.so.3: open failed:No such file or directory

Hi Friends I have a compiler(Sun Forte,I believe) running in my Solaris 9 box. since y'day my development team is finding this error when they compile: ld.so.1: expr: fatal: libgmp.so.3: open failed: No such file or directory I ran a search for this file and found it in one of my file... (2 Replies)
Discussion started by: Hari_Ganesh
2 Replies

9. Programming

ld: fatal error

i am trying to compile my program using a makefile and i keep getting this message: Undefined first referenced symbol in file main /usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.3/crt1.o ld: fatal: Symbol referencing errors. No output written to prog5 collect2: ld returned 1 exit status ***... (2 Replies)
Discussion started by: betterdayz
2 Replies

10. Programming

ld: fatal error

dear all , iam trying to compile a progam using gcc compiler on a sun 280 R machine running solaris 9 . iam getting an error in the last step when the compiler tries to link the objects , although the compiler executes some applicarions that contains no objects smoothly, the error that... (1 Reply)
Discussion started by: ppass
1 Replies
Login or Register to Ask a Question