I followed the steps listed at https://cubes.readthedocs.io/en/v1.0.1/install.html and did the following:

  1. Installed Python

  2. Installed PostgreSQL

    ssudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
    wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
    sudo apt-get -y install postgresql
  3. Installed Miniconda and created a conda datacube environment

    conda config --add channels conda-forge
    conda create --name cubeenv python=3.6 datacube
    source activate cubeenv
    datacube system check 

Gives me an error stating

psql: error: could not connect to server: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

Problem is that PostgreSQL is accessible outside the environment but not getting connected once the environment is activated.

A screenshot of the same is attached. enter image description here

  • 1
    This question is a valid concern for many users initially setting up a Data Cube environment. Some clarity as to why it has been closed would be nice
    – JackLidge
    Mar 8, 2021 at 13:45


Browse other questions tagged or ask your own question.