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

Install on MacOS Ventura 13.5 #239

Closed
muckisg opened this issue Aug 16, 2023 · 10 comments
Closed

Install on MacOS Ventura 13.5 #239

muckisg opened this issue Aug 16, 2023 · 10 comments

Comments

@muckisg
Copy link

muckisg commented Aug 16, 2023

Hi,

i tried to install yara-python via pip but git an error while compilation:

yara/libyara/modules/pe/authenticode-parser/authenticode.c:22:10: fatal error: 'openssl/asn1.h' file not found

What depencies do i have to correct? Or is it just the correction of a file-/lib-path because i find the missing asn1.h header file e.g. under /opt/homebrew/Cellar/openssl@3/3.1.2/include/openssl/asn1.h?

Thx in advance,
Maurice

@wxsBSD
Copy link
Contributor

wxsBSD commented Aug 17, 2023

You need to tell the configure script where your OpenSSL headers and libraries are.

CFLAGS="-I/opt/homebrew/openssl/include" LDFLAGS="-L/opt/homebrew/openssl/lib" ./configure

@muckisg
Copy link
Author

muckisg commented Aug 18, 2023

@wxsBSD Thanks for your help but to tell the truth i do not know how to access the configure script because it is part of the pip installation process. I tried locate configure | grep yara to identify a maybe cached configure script but did not find anything.
So, would you help a Apple newbie again? ;-)

Thanks a lot, Maurice

@wxsBSD
Copy link
Contributor

wxsBSD commented Aug 18, 2023

Sorry, I missed that you were using pip here. I've never done it but you should be able to do:

CFLAGS="-I/opt/homebrew/openssl/include" LDFLAGS="-L/opt/homebrew/openssl/lib" pip instal ...

@muckisg
Copy link
Author

muckisg commented Aug 21, 2023

Dear @wxsBSD,

the pip enviroment seems not to work with CFLAGS & LDFLAGS. :-(

In the error message i found the (hardcoded?) search path "/usr/local/opt/openssl/include" so i tried working with a symbolic link. This worked for me in the moment!

Th@nx a lot,

Maurice

@plusvic
Copy link
Member

plusvic commented Dec 29, 2023

Should be fixed in #248

@plusvic plusvic closed this as completed Dec 29, 2023
@psifertex
Copy link

Is this resolved in pip or does that require a new release? Looks like the last release was in April?

@lo-chr
Copy link
Contributor

lo-chr commented Dec 29, 2023

@psifertex: My understanding is, that the version in the pip repository is updated with a new release only.

@psifertex
Copy link

Is there a different issue tracking an updated release on pip that could be linked here then? I ask since one of the plugins in the Binary Ninja community plugin repository depends on this package and installs dependencies via pip so it would be nice to direct people to an issue tracking when it's resolved.

@40huo
Copy link

40huo commented Jan 30, 2024

CFLAGS="-I/opt/homebrew/opt/openssl/include" LDFLAGS="-L/opt/homebrew/opt/openssl/lib" pip install yara-python

This command works for me. The correct directory is /opt/homebrew/opt/openssl/ but not /opt/homebrew/openssl/ under my environment.

@psifertex
Copy link

Thanks! I can confirm that works for me too. Good work-around until the release is updated.

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

6 participants