Ask Totally different is a query and reply website for energy customers of Apple {hardware} and software program. It solely takes a minute to enroll.
Anyone can ask a query
Anyone can reply
The very best solutions are voted up and rise to the highest
Requested
Considered
2 occasions
It looks like gcc cannot learn the headers within the embody folder of OpeenSSL. Should not the flags I added within the ~/.zprofile
assist with discovering that, although?
What am I lacking?
Unique Process
Compile this C program. It can use OpenSSL to encrypt/decrypt utilizing AES-256-GCB.
Difficulty
When I attempt to run
gcc Evp-gcm-encrypt.c -o Evp-gcm-encrypt
I get
Evp-gcm-encrypt.c:1:10: deadly error: openssl/conf.h: No such file or listing
1 | #embody <openssl/conf.h>
| ^~~~~~~~~~~~~~~~
compilation terminated.
What I attempted
-
I put in OpenSSL by way of House-brew.
brew replace brew set up openssl@1.1
-
Added such strains each in my ~/.zprofile and ~/.zshrc
export PATH="/usr/native/decide/openssl@1.1/bin:$PATH" export LDFLAGS="-L/usr/native/decide/openssl@1.1/lib" export CPPFLAGS="-I/usr/native/decide/openssl@1.1/embody"
-
Eliminated and re-installed the Xcode command-line-tools
sudo rm -rf /Library/Developer/CommandLineTools xcode-select --install
-
Deactivated Anaconda’s OpenSSL (it was being executed earlier than the home-brew model)
conda deactivate
-
Linking OpenSSL
brew hyperlink --force openssl
however I get
Error: No such keg: /usr/native/Cellar/openssl
-
Linking OpenSSL@1.1
brew hyperlink --force openssl@1.1
however I get
Warning: Refusing to hyperlink macOS supplied/shadowed software program: openssl@1.1 If it is advisable to have openssl@1.1 first in your PATH, run: echo 'export PATH="/usr/native/decide/openssl@1.1/bin:$PATH"' >> ~/.zshrc For compilers to seek out openssl@1.1 you might must set: export LDFLAGS="-L/usr/native/decide/openssl@1.1/lib" export CPPFLAGS="-I/usr/native/decide/openssl@1.1/embody" For pkg-config to seek out openssl@1.1 you might must set: export PKG_CONFIG_PATH="/usr/native/decide/openssl@1.1/lib/pkgconfig"
System information
- MacOS 12.5.1 (Monterey)
- MacBook Air (Retina, 13-inch, 2018)
- SIP disabled
- Safety set to none
You could log in to reply this query.
lang-bash