Skip to content

Installation of pygit2 is failing #999

Closed
@johnsamuelwrites

Description

@johnsamuelwrites

On running

pip3 install pygit2

I get the following error on Ubuntu 19.10

src/types.h:36:2: error: #error You need a compatible libgit2 version (1.0.x)
       36 | #error You need a compatible libgit2 version (1.0.x)
          |  ^~~~~
    src/types.h:251:5: error: unknown type name ‘git_mailmap’
      251 |     git_mailmap *mailmap;
          |     ^~~~~~~~~~~
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

A previous issue suggested installing libgit2-dev and also build-essential libffi-dev python-dev libgit2-dev, but there is no change. Am I missing any particular installation.

Following is the version of libgit installed.

$ ldconfig -p | grep libgit
	libgit2.so.27 (libc6,x86-64) => /lib/x86_64-linux-gnu/libgit2.so.27
	libgit2.so (libc6,x86-64) => /lib/x86_64-linux-gnu/libgit2.so

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions