我必须在我的 ubuntu 机器上安装 pygit2 库。当我尝试“pip install pygit2”时出现以下错误。
cffi.ffiplatform.VerificationError: CompileError: command 'x86_64-linux-gnu-gcc' failed with exit status 1
清理...命令 python setup.py egg_info 在 /tmp/pip_build_root/pygit2 中失败,错误代码 1 在 /root/.pip/pip.log 中存储失败的调试日志
在此之前,我做了以下事情很好(http://www.pygit2.org/install.html#quick-install)。
$ wget https://github.com/libgit2/libgit2/archive/v0.22.0.tar.gz
$ tar xzf v0.22.0.tar.gz
$ cd libgit2-0.22.0/
$ cmake .
$ make
$ sudo make install
我的机器上已经有 libffi6 了。
sudo apt-get install libffi6 libffi-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libffi-dev is already the newest version.
libffi6 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 16 not upgraded.