Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Adding libpq-dev to prerequisites for Raspbian #5106

Closed
wants to merge 2 commits into from
Closed

Adding libpq-dev to prerequisites for Raspbian #5106

wants to merge 2 commits into from

Conversation

audvin
Copy link

@audvin audvin commented Apr 26, 2019

The package libpq-dev is required in order to install from source on Raspbian/Raspberry Pi.

On a fresh install of Raspbian on a Raspberry Pi, the source install will fail on the psycopg2 step:

Collecting psycopg2>=2.6; extra == "all" (from matrix-synapse[all])
  Using cached https://files.pythonhosted.org/packages/23/7e/93c325482c328619870b6cd09370f6dbe1148283daca65115cd63642e60f/psycopg2-2.8.2.tar.gz
    ERROR: Complete output from command python setup.py egg_info:
    ERROR: running egg_info
    creating pip-egg-info/psycopg2.egg-info
    writing pip-egg-info/psycopg2.egg-info/PKG-INFO
    writing dependency_links to pip-egg-info/psycopg2.egg-info/dependency_links.txt
    writing top-level names to pip-egg-info/psycopg2.egg-info/top_level.txt
    writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt'
    
    Error: pg_config executable not found.
    
    pg_config is required to build psycopg2 from source.  Please add the directory
    containing pg_config to the $PATH or specify the full executable path with the
    option:
    
        python setup.py build_ext --pg-config /path/to/pg_config build ...
    
    or with the pg_config option in 'setup.cfg'.
    
    If you prefer to avoid building psycopg2 from source, please install the PyPI
    'psycopg2-binary' package instead.
    
    For further information please check the 'doc/src/install.rst' file (also at
    <http://initd.org/psycopg/docs/install.html>).
    
    ----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-l2ooiex9/psycopg2/

The solution is to install the package libpq-dev with sudo apt-get install libpq-dev since this is where the pg_config executable is found.

Signed-off-by: Audun Utengen [email protected]

Pull Request Checklist

  • Pull request is based on the develop branch

Audun Utengen added 2 commits April 26, 2019 10:27
The package `libpq-dev` is required in order to install from source on Raspbian/Raspberry Pi. 

On a fresh install of Raspbian on a Raspberry Pi, the source install will fail on the `psycopg2` step:

```
Collecting psycopg2>=2.6; extra == "all" (from matrix-synapse[all])
  Using cached https://files.pythonhosted.org/packages/23/7e/93c325482c328619870b6cd09370f6dbe1148283daca65115cd63642e60f/psycopg2-2.8.2.tar.gz
    ERROR: Complete output from command python setup.py egg_info:
    ERROR: running egg_info
    creating pip-egg-info/psycopg2.egg-info
    writing pip-egg-info/psycopg2.egg-info/PKG-INFO
    writing dependency_links to pip-egg-info/psycopg2.egg-info/dependency_links.txt
    writing top-level names to pip-egg-info/psycopg2.egg-info/top_level.txt
    writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt'
    
    Error: pg_config executable not found.
    
    pg_config is required to build psycopg2 from source.  Please add the directory
    containing pg_config to the $PATH or specify the full executable path with the
    option:
    
        python setup.py build_ext --pg-config /path/to/pg_config build ...
    
    or with the pg_config option in 'setup.cfg'.
    
    If you prefer to avoid building psycopg2 from source, please install the PyPI
    'psycopg2-binary' package instead.
    
    For further information please check the 'doc/src/install.rst' file (also at
    <http://initd.org/psycopg/docs/install.html>).
    
    ----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-l2ooiex9/psycopg2/
```

The solution is to install the package `libpq-dev` with `sudo apt-get install libpq-dev` since this is where the `pg_config` executable is found.
@richvdh
Copy link
Member

richvdh commented May 9, 2019

blocked on a decision on #5168

@richvdh richvdh removed their request for review May 9, 2019 21:54
@richvdh
Copy link
Member

richvdh commented May 16, 2019

Thanks for this, but we're going down the path of #5197 instead.

@richvdh richvdh closed this May 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants