aspiers / git-explode

Explode linear sequence of git commits into topic branches
GNU General Public License v2.0
53 stars 3 forks source link

install pygit2: fatal error: 'git2.h' file not found #3

Open telephon opened 6 years ago

telephon commented 6 years ago

maybe this is not a git-explode issue, but still I've run into it:

sudo pip install git-deps

results in:

 creating build/temp.macosx-10.11-x86_64-2.7
    building '_pygit2' extension
    creating build/temp.macosx-10.11-x86_64-2.7/src
    clang -fno-strict-aliasing -fno-common -dynamic -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/include -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/blob.c -o build/temp.macosx-10.11-x86_64-2.7/src/blob.o
    In file included from src/blob.c:30:
    src/blob.h:33:10: fatal error: 'git2.h' file not found
    #include <git2.h>
             ^
    1 error generated.
    error: command 'clang' failed with exit status 1

    ----------------------------------------
Command "/usr/local/opt/python@2/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-install-u4aDlM/pygit2/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/tmp/pip-record-_osVGz/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-install-u4aDlM/pygit2/
RonnyPfannschmidt commented 6 years ago

this looks like missing libgit2-devel

also please never ever use sudo pip install - it tends to break stuff the packge manager owns

telephon commented 6 years ago

ok, thanks! I must have read it in some description.

jugmac00 commented 2 years ago

If anybody is using a deb-based distribution, there the package name is libgit2-dev.