OpenSSL@1.1 not getting linked with Homebrew - trying to install postgresql

2022-04-12 Thread cecile rougnaux
My system is OS Mojave 10.14.6, I got homebrew from this command :

 /bin/bash -c "$(curl -fsSL 
https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

when I try to install postgresql with the command
brew install postgresql

I have this error:

Error: An exception occurred within a child process:
  RuntimeError: /usr/local/opt/openssl@1.1 not present or broken
Please reinstall openssl@1.1. Sorry :(

When I try to install openssl@1.1 I have this message:

brew install openssl@1.1
Running `brew update --preinstall`...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/cask).
==> Updated Casks
Updated 8 casks.

Warning: openssl@1.1 1.1.1n is already installed, it's just not linked.
To link this version, run:
  brew link openssl@1.1
➜  / brew link openssl@1.1
Warning: Refusing to link macOS provided/shadowed software: openssl@1.1
If you need to have openssl@1.1 first in your PATH, run:
  echo 'export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"' >> ~/.zshrc

For compilers to find openssl@1.1 you may need to set:
  export LDFLAGS="-L/usr/local/opt/openssl@1.1/lib"
  export CPPFLAGS="-I/usr/local/opt/openssl@1.1/include"

For pkg-config to find openssl@1.1 you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/openssl@1.1/lib/pkgconfig"

And then when I try to force hombrew link openssl, I get this message

Warning: Refusing to link macOS provided/shadowed software: openssl@1.1
If you need to have openssl@1.1 first in your PATH, run:
  echo 'export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"' >> ~/.zshrc

For compilers to find openssl@1.1 you may need to set:
  export LDFLAGS="-L/usr/local/opt/openssl@1.1/lib"
  export CPPFLAGS="-I/usr/local/opt/openssl@1.1/include"

For pkg-config to find openssl@1.1 you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/openssl@1.1/lib/pkgconfig"

I added the lines to .zshrc file as suggested:

export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/openssl@1.1/lib"
export CPPFLAGS="-I/usr/local/opt/openssl@1.1/include"
export PKG_CONFIG_PATH="/usr/local/opt/openssl@1.1/lib/pkgconfig"

But I kept on having the message when retrying to intall postgresql

Error: An exception occurred within a child process:
  RuntimeError: /usr/local/opt/openssl@1.1 not present or broken

I also tried this command:

brew reinstall openssl

openssl@3 is installed and I get this message:

openssl@3 is keg-only, which means it was not symlinked into /usr/local,
because macOS provides LibreSSL.
and then when I try to

brew install postgresql

I have the same error:
Error: An exception occurred within a child process:
 RuntimeError: /usr/local/opt/openssl@1.1 not present or broken
Please reinstall openssl@1.1.

and The pg version in my rails gemfile is
gem "pg", "1.3.5"
but I just tried brew install pg,
and bundle install fails also.
If anyone could help, I am totally stuck here, thanks!
Cécile




RE: OpenSSL@1.1 not getting linked with Homebrew - trying to install postgresql

2022-04-13 Thread cecile rougnaux
Hello Adrian,

As suggested from another user, I am going to reinstall and upgrade my OS to 
Catalina, which is better supported.
Then I will follow the steps with homebrew and hopefully this will clean the 
mess I am in 😉
Thanks for your answer!
C

De : Adrian Ho 
Envoyé : mercredi 13 avril 2022 06:16
À : pgsql-general@lists.postgresql.org 
Objet : Re: OpenSSL@1.1 not getting linked with Homebrew - trying to install 
postgresql

On 12/4/22 18:33, cecile rougnaux wrote:
My system is OS Mojave 10.14.6, I got homebrew from this command :

 /bin/bash -c "$(curl -fsSL 
https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

when I try to install postgresql with the command
brew install postgresql

I have this error:

Error: An exception occurred within a child process:
  RuntimeError: /usr/local/opt/openssl@1.1 not present or broken
Please reinstall openssl@1.1<mailto:openssl@1.1>. Sorry :(

When I try to install openssl@1.1<mailto:openssl@1.1> I have this message:


Note that the error message is literally asking you to:


brew reinstall openssl@1.1<mailto:openssl@1.1>


not:


brew install openssl@1.1<mailto:openssl@1.1>


and not:


brew reinstall openssl


Do the reinstall and see if the postgresql formula works now. If it still 
doesn't work, the Homebrew discussions forum is a more appropriate place to 
follow up: https://github.com/Homebrew/discussions/discussions


Also:


brew link openssl@1.1<mailto:openssl@1.1>


and all the exports you said you added to your .zshrc should not be needed, so 
you should:


brew unlink openssl@1.1<mailto:openssl@1.1>


and revert all your additions.


--
Best Regards,
Adrian


Error dydl : image not found when trying to install pg on Catalina

2022-04-17 Thread cecile rougnaux
I upgraded my system to Catalina 10.15.7 and now I get an  error with dyld : 
image not found when trying to install postgresql :


➜  ~ brew install postgresql

Running `brew update --preinstall`...

==> Auto-updated Homebrew!

Updated 1 tap (homebrew/core).

==> Updated Formulae

Updated 6 formulae.


==> Downloading https://ghcr.io/v2/homebrew/core/krb5/manifests/1.19.3

Already downloaded: 
/Users/rougnaux/Library/Caches/Homebrew/downloads/99d453969cccecf3b539a32dfa27cbdc85c12d0017c92bec5729bea7cf6328a2--krb5-1.19.3.bottle_manifest.json

==> Downloading 
https://ghcr.io/v2/homebrew/core/krb5/blobs/sha256:e269d5d0c19c6da2521b8ab8a51f5ac1229387b

Already downloaded: 
/Users/rougnaux/Library/Caches/Homebrew/downloads/0a454bc3adeb2c958c03807c84ff279323ff741e3b8a64aa78603f558e7b4c94--krb5--1.19.3.catalina.bottle.tar.gz

==> Downloading https://ghcr.io/v2/homebrew/core/postgresql/manifests/14.2_1

Already downloaded: 
/Users/rougnaux/Library/Caches/Homebrew/downloads/6a491ab32f22a1325da9bceba1f59875f5c43478aa890de97644fb7c1b196e18--postgresql-14.2_1.bottle_manifest.json

==> Downloading 
https://ghcr.io/v2/homebrew/core/postgresql/blobs/sha256:bb6bf761a60c6aec73f31595e167c2c78

Already downloaded: 
/Users/rougnaux/Library/Caches/Homebrew/downloads/e3f7b538f0e6cf2f8a966ce5d9de5e4aca2d2da9d0b1905217f5930200ac552f--postgresql--14.2_1.catalina.bottle.tar.gz

==> Installing dependencies for postgresql: krb5

==> Installing postgresql dependency: krb5

==> Pouring krb5--1.19.3.catalina.bottle.tar.gz

🍺  /usr/local/Cellar/krb5/1.19.3: 162 files, 5.2MB

==> Installing postgresql

==> Pouring postgresql--14.2_1.catalina.bottle.tar.gz

==> /usr/local/Cellar/postgresql/14.2_1/bin/initdb --locale=C -E UTF-8 
/usr/local/var/postgres

Last 15 lines from 
/Users/rougnaux/Library/Logs/Homebrew/postgresql/post_install.01.initdb:

2022-04-17 13:10:48 +0200


/usr/local/Cellar/postgresql/14.2_1/bin/initdb

--locale=C

-E

UTF-8

/usr/local/var/postgres


dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.70.dylib

  Referenced from: /usr/local/Cellar/postgresql/14.2_1/bin/postgres

  Reason: image not found

no data was returned by command 
""/usr/local/Cellar/postgresql/14.2_1/bin/postgres" -V"

initdb: error: The program "postgres" is needed by initdb but was not found in 
the

same directory as "/usr/local/Cellar/postgresql/14.2_1/bin/initdb".

Check your installation.

Warning: The post-install step did not complete successfully

You can try again using:

  brew postinstall postgresq


How can I fix this ?
Thanks for help!
Cécile