Postgresql – Postgres server is not starting

macospostgresql

I have installed postgres 11 earlier on my MacBook Pro. Suddenly it stopped working. Usually I start my postgres server by following command

pg_ctl -D /usr/local/var/postgres start

and it returning the following error

dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.63.dylib
  Referenced from: /usr/local/Cellar/postgresql/11.1_1/bin/postgres
  Reason: image not found
no data was returned by command ""/usr/local/Cellar/postgresql/11.1_1/bin/postgres" -V"
The program "postgres" is needed by pg_ctl but was not found in the
same directory as "/usr/local/Cellar/postgresql/11.1_1/bin/pg_ctl".
Check your installation.

How can I solve this?

Best Answer

try to install\upgrade, Assuming you have Ubuntu on your machines then execute the following commands:

Upgrade:

sudo apt-get update
sudo apt upgrade

Install:

sudo apt install zsh
sudo apt-get install powerline fonts-powerline

If you have Fedora:

sudo dnf install zsh

MacOS

brew upgrade postgresql