backports/lzma/_lzmamodule.c:115:18: fatal error:

2019-04-04 02:12发布

问题:

I'm trying to install docker-registry. I got stuck after this:

$ apt-get install python-pip python-dev
$ pip install -r requirements.txt
[...]
backports/lzma/_lzmamodule.c:115:18: fatal error: lzma.h: No such file or directory

The docker-registry I downloaded is v0.6.7

回答1:

$ apt-get install -y liblzma-dev


回答2:

On Centos the package is

yum install -y xz-devel


回答3:

For OSX with Homebrew.

brew install xz

The formula is xz which because lzma formula is deprecated, since it became a part of xz.