tox -egenconfig fails in ubuntu 22.04
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
masakari |
New
|
Undecided
|
Unassigned |
Bug Description
I installed fresh new openstack in ubuntu 22.04 with zed.
with running tox -egenconfig in masakari main folder i recive this error.
please help me to solve it:
genconfig create: /root/masakari/
genconfig installdeps: -chttps:
ERROR: invocation failed (exit code 1), logfile: /root/masakari/
=======
Using cached alembic-
Collecting iso8601>=0.1.11
Using cached iso8601-
Collecting jsonschema>=3.2.0
Using cached jsonschema-
Collecting keystoneauth1>
Using cached keystoneauth1-
Collecting keystonemiddlew
Using cached keystonemiddlew
Collecting WebOb>=1.7.1
Using cached WebOb-1.
Collecting microversion-
Using cached microversion_
Collecting oslo.config>=5.2.0
Using cached oslo.config-
Collecting oslo.context>
Using cached oslo.context-
Collecting oslo.db>=4.44.0
Using cached oslo.db-
Collecting oslo.messaging>
Using cached oslo.messaging-
Collecting oslo.i18n>=3.15.3
Using cached oslo.i18n-
Collecting oslo.log>=3.36.0
Using cached oslo.log-
Collecting oslo.middleware
Using cached oslo.middleware
Collecting oslo.policy>=3.6.0
Using cached oslo.policy-
Collecting oslo.service!
Using cached oslo.service-
Collecting oslo.upgradeche
Using cached oslo.upgradeche
Collecting oslo.utils>=4.7.0
Using cached oslo.utils-
Collecting oslo.versionedo
Using cached oslo.versionedo
Collecting pbr!=2.1.0,>=2.0.0
Using cached pbr-6.0.
Collecting python-
Using cached python_
Collecting stevedore>=1.20.0
Using cached stevedore-
Collecting SQLAlchemy>=1.2.19
Using cached SQLAlchemy-
Collecting SQLAlchemy-
Using cached SQLAlchemy_
Collecting taskflow>=2.16.0
Using cached taskflow-
Collecting tooz>=2.10.1
Using cached tooz-6.
Collecting hacking~=6.0.1
Using cached hacking-
Collecting coverage!=4.4,>=4.0
Using cached coverage-
Collecting ddt>=1.0.1
Using cached ddt-1.7.
Collecting doc8>=0.6.0
Using cached doc8-1.
Collecting pep8>=1.5.7
Using cached pep8-1.
Collecting psycopg2>=2.8
Using cached psycopg2-
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
error: subprocess-
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [23 lines of output]
running egg_info
creating /tmp/pip-
writing /tmp/pip-
writing dependency_links to /tmp/pip-
writing top-level names to /tmp/pip-
writing manifest file '/tmp/pip-
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
'
For further information please check the 'doc/src/
<https:/
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
=======
_______
solving problem:
# apt-get install postgresql -y
# pip install psycopg2-binary
# apt-get install libpq-dev -y
# apt-get install mercurial -y
# apt install tox -y
verify hg installation:
# hg --version
# which hg
# find / -name pg_config postgresql/ 14/bin/ pg_config
outpute: /usr/lib/
# export PATH=$PATH: /usr/lib/ postgresql/ 14/bin/ pg_config
# cd masakari
# tox -egenconfig