Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
telephon opened this issue May 29, 2018 · 3 comments
Open

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

telephon opened this issue May 29, 2018 · 3 comments

Comments

@telephon
Copy link

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
Copy link

this looks like missing libgit2-devel

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

@telephon
Copy link
Author

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

@jugmac00
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants