When I compiling libvirt code from github,There are the following errors:
[395/1071] Generating 'docs/committer-guidelines.html.p/committer-guidelines.html.in'.
FAILED: docs/committer-guidelines.html.p/committer-guidelines.html.in
/usr/bin/meson --internal exe --capture docs/committer-guidelines.html.p/committer-guidelines.html.in -- /usr/local/bin/rst2html5 --stylesheet= --strict ../docs/committer-guidelines.rst
Traceback (most recent call last):
File "/usr/local/bin/rst2html5", line 7, in <module>
from rst2html5_ import main
File "/usr/local/lib/python3.6/site-packages/rst2html5_.py", line 17, in <module>
from rst2html5 import HTML5Writer # noqa E402
File "/usr/local/lib/python3.6/site-packages/rst2html5/__init__.py", line 4, in <module>
from importlib import metadata
ImportError: cannot import name 'metadata'
[422/1071] Compiling C object src/conf/libvirt_conf.a.p/domain_conf.c.o
ninja: build stopped: subcommand failed.
I have tried some ways,but it didn’t solve the problem
-
pipenv install jsonschema==3.0.2 from this
-
update python version to 3.8
Compile Environment:
centos 8; linux 5.14.7; python 3.6.8; libvirt main
2
Answers
Try updating your
rst2html5
package:Could you try this method:
In file of /usr/local/lib/python3.6/site-packages/rst2html5/init.py
modify to:
https://gitlab.com/meltano/sdk/-/issues/58