Open1
pycarioのerror

AWSのubuntu 20.04環境のDocker(ubuntu 20.04)のコンテナでPython3.9を動かしていたところ以下のエラーにあった
pip install -e .
エラー内容
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 /tmp/tmps2mpr8ap_in_process.py build_wheel /tmp/tmpwqhja32j
cwd: /tmp/pip-install-7yprg20k/pycairo
Complete output (15 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-39
creating build/lib.linux-x86_64-cpython-39/cairo
copying cairo/__init__.py -> build/lib.linux-x86_64-cpython-39/cairo
copying cairo/__init__.pyi -> build/lib.linux-x86_64-cpython-39/cairo
copying cairo/py.typed -> build/lib.linux-x86_64-cpython-39/cairo
running build_ext
Package cairo was not found in the pkg-config search path.
Perhaps you should add the directory containing `cairo.pc'
to the PKG_CONFIG_PATH environment variable
No package 'cairo' found
Command '['pkg-config', '--print-errors', '--exists', 'cairo >= 1.15.10']' returned non-zero exit status 1.
解決策
apt-get install pkg-config
apt-get install libcairo2-dev