Skip to content

Solved: John the Ripper crypt error during make

August 1, 2010

If you’re getting this nasty error while running make on John the Ripper:

XSHA_fmt.c:7:25: error: openssl/sha.h: No such file or directory
XSHA_fmt.c:43: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ctx’
XSHA_fmt.c: In function ‘crypt_all’:
XSHA_fmt.c:147: warning: implicit declaration of function ‘SHA1_Init’
XSHA_fmt.c:147: error: ‘ctx’ undeclared (first use in this function)
XSHA_fmt.c:147: error: (Each undeclared identifier is reported only once
XSHA_fmt.c:147: error: for each function it appears in.)
XSHA_fmt.c:148: warning: implicit declaration of function ‘SHA1_Update’
XSHA_fmt.c:150: warning: implicit declaration of function ‘SHA1_Final’
make[1]: *** [XSHA_fmt.o] Error 1
make[1]: Leaving directory `/home/carl/Downloads/john-1.7.6/src'
make: *** [linux-x86-any] Error 2

… then you need to install libssl-dev:

sudo apt-get install libssl-dev

JtR should then build fine…


From → Linux

  1. Chk permalink


  2. Marcus permalink

    This fixed my problem…Thank you!!! Can you tell me how you came across that it was libssl-dev causing the problem?

  3. Many thanks! Worked like a charm

  4. In Centos, instead of libssl-dev, try openssl-devel, like the following:
    yum install openssl-devel


  5. Cat permalink

    Worked, thanks.

  6. Mike McC. permalink

    Ohhh how I love immediately finding the correct answer to something via a web search… many thanks. 😀

  7. this made my day. thank you!!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: