smashedtoatoms / asdf-postgres

asdf plugin for Postgres
MIT License
203 stars 37 forks source link

Unable to install postgres 17.2 on OSX Sequoia #95

Open er-jpg opened 1 day ago

er-jpg commented 1 day ago

Describe the bug

I'm getting an error about the error: library 'crypto' is required for OpenSSL, even if following the instructions on the README.md file.

Steps to reproduce

  1. Using macOS Sequoia 15.1.1
  2. Install the packages with brew using the command brew install gcc readline zlib curl ossp-uuid icu4c pkg-config
  3. Exporting the environment variables with export PKG_CONFIG_PATH="/opt/homebrew/bin/pkg-config:$(brew --prefix icu4c)/lib/pkgconfig:$(brew --prefix curl)/lib/pkgconfig:$(brew --prefix zlib)/lib/pkgconfig"
  4. Running the command to add the plugin asdf plugin-add postgres
  5. Then running the command to add the plugin with the version asdf install postgres 17.2 you get the following error when compiling
checking for CRYPTO_new_ex_data in -lcrypto... no
configure: error: library 'crypto' is required for OpenSSL

Expected behavior

It is expected for the installation of the plugin to pass.

smashedtoatoms commented 1 day ago

Take a look at this thread and see if any of it works. OpenSSL is such a tire fire I can't keep up with it: https://github.com/smashedtoatoms/asdf-postgres/issues/52

er-jpg commented 1 day ago

Thank you! That worked, what do you think about adding the command at the end in the documentation?

brew install gcc icu4c readline zlib curl ossp-uuid pkg-config
asdf plugin-add postgres
export OPENSSL_PATH=$(brew --prefix openssl)
export CMAKE_PREFIX_PATH=$(brew --prefix icu4c)
export PATH="$OPENSSL_PATH/bin:$CMAKE_PREFIX_PATH/bin:$PATH"
export LDFLAGS="-L$OPENSSL_PATH/lib $LDFLAGS"
export CPPFLAGS="-I$OPENSSL_PATH/include $CPPFLAGS"
export PKG_CONFIG_PATH="$CMAKE_PREFIX_PATH/lib/pkgconfig"
asdf install postgres 17.2

This worked for me.