12

Postgres Woes on OSX with libicui18n.69.dylib

 1 year ago
source link: https://fuzzyblog.io/blog/postgres/2022/04/21/postgres-woes-on-osx-with-libicui18n-69-dylib.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Postgres Woes on OSX with libicui18n.69.dylib

Apr 21, 2022

Perhaps it is me but I've found that homebrew seems to give more errors and take longer than it used it. I just got hit with this error:

	/usr/local/opt/postgresql/bin/postgres -v
	dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.69.dylib
	  Referenced from: /usr/local/opt/postgresql/bin/postgres
	  Reason: image not found

Digging into the OSX postgres log here:

tail -n 100 /usr/local/var/log/postgresql.log

helped but didn't tell me what to do.

An awful lot of googling didn't find me an answer but then I hit on:

brew reinstall icu4c

That churned for a bit but then declared a decisive victory:

	🍺  /usr/local/Cellar/maxima/5.46.0: 2,842 files, 119.1MB
	==> Running `brew cleanup maxima`...
	Removing: /usr/local/Cellar/maxima/5.45.1_4... (2,774 files, 118.4MB)
	Removing: /Users/sjohnson/Library/Caches/Homebrew/maxima--5.45.1_4... (38.3MB)
	==> Upgrading postgresql
	  13.2_2 -> 14.2_1

	==> 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
	==> Caveats
	To migrate existing data from a previous major version of PostgreSQL run:
	  brew postgresql-upgrade-database

	This formula has created a default database cluster with:
	  initdb --locale=C -E UTF-8 /usr/local/var/postgres
	For more details, read:
	  https://www.postgresql.org/docs/14/app-initdb.html

	To restart postgresql after an upgrade:
	  brew services restart postgresql
	Or, if you don't want/need a background service you can just run:
	  /usr/local/opt/postgresql/bin/postgres -D /usr/local/var/postgres
	==> Summary
	🍺  /usr/local/Cellar/postgresql/14.2_1: 3,305 files, 45.5MB
	==> Running `brew cleanup postgresql`...
	Removing: /usr/local/Cellar/postgresql/13.2_2... (3,218 files, 42.6MB)
	Removing: /Users/sjohnson/Library/Caches/Homebrew/postgresql--13.2_2... (11.1MB)
	==> Checking for dependents of upgraded formulae...
	==> No broken dependents found!
	==> Caveats
	==> [email protected]
	This formula has created a default database cluster with:
	  initdb --locale=C -E UTF-8 /usr/local/var/[email protected]
	For more details, read:
	  https://www.postgresql.org/docs/11/app-initdb.html

	[email protected] is keg-only, which means it was not symlinked into /usr/local,
	because this is an alternate version of another formula.

	If you need to have [email protected] first in your PATH, run:
	  echo 'export PATH="/usr/local/opt/postgres[email protected]/bin:$PATH"' >> ~/.zshrc

	For compilers to find [email protected] you may need to set:
	  export LDFLAGS="-L/usr/local/opt/[email protected]/lib"
	  export CPPFLAGS="-I/usr/local/opt/[email protected]/include"

	For pkg-config to find [email protected] you may need to set:
	  export PKG_CONFIG_PATH="/usr/local/opt/[email protected]/lib/pkgconfig"


	To restart [email protected] after an upgrade:
	  brew services restart [email protected]
	Or, if you don't want/need a background service you can just run:
	  /usr/local/opt/[email protected]/bin/postgres -D /usr/local/var/[email protected]
	==> maxima
	Emacs Lisp files have been installed to:
	  /usr/local/share/emacs/site-lisp/maxima
	==> postgresql
	To migrate existing data from a previous major version of PostgreSQL run:
	  brew postgresql-upgrade-database

	This formula has created a default database cluster with:
	  initdb --locale=C -E UTF-8 /usr/local/var/postgres
	For more details, read:
	  https://www.postgresql.org/docs/14/app-initdb.html

	To restart postgresql after an upgrade:
	  brew services restart postgresql
	Or, if you don't want/need a background service you can just run:
	  /usr/local/opt/postgresql/bin/postgres -D /usr/local/var/postgres

I followed this up with:

echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.zshrc

And then to confirm success:

brew services restart [email protected]

And, once again, I have postgres running locally.


Posted In: #postgres #osx


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK