- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 403
Closed
Description
System: Arch Linux
libgit2 version: 0.24.0
python version: 3.5.1
pip version: 8.1.0
not fixed by:
$ sudo ldconfig
output:
$python -c 'import pygit2'
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python3.5/site-packages/pygit2/init.py", line 32, in
from _pygit2 import *
ImportError: libgit2.so.24: cannot open shared object file: No such file or directory
Activity
pypingou commentedon Mar 10, 2016
Which version of pygit2 are you using?
raimondi1337 commentedon Mar 10, 2016
0.24.0
jdavid commentedon Mar 11, 2016
Try this command:
$ ldd /usr/lib/python3.5/site-packages/_pygit2.so
What it shows?
raimondi1337 commentedon Mar 11, 2016
ldd: /usr/lib/python3.5/site-packages/_pygit2.so: No such file or directory
$pip install pygit2
Requirement already satisfied (use --upgrade to upgrade): pygit2 in /usr/lib/python3.5/site-packages
Requirement already satisfied (use --upgrade to upgrade): cffi in /usr/lib/python3.5/site-packages (from pygit2)
Requirement already satisfied (use --upgrade to upgrade): six in /usr/lib/python3.5/site-packages (from pygit2)
Requirement already satisfied (use --upgrade to upgrade): pycparser in /usr/lib/python3.5/site-packages (from cffi->pygit2)
raimondi1337 commentedon Mar 30, 2016
nope
GeorgeL9 commentedon Apr 7, 2016
I am having the same issue.
Running Ubuntu 15.04
GeorgeL9 commentedon Apr 7, 2016
Solved!
Per the docs:
xiaoanyunfei commentedon May 18, 2016
My os is CentOS release 6.5 (Final),and I have the same problem
The reason maybe the libgit2.so.0.24.0 was put into wrong diretcory(/usr/local/lib)
But command ldconfig default to detect /lilb and /usr/lib
execute
# ldconfig -p | grep libgit2
,if libgit2.so.0.24.0 not in output, you can doas below
#cp /usr/local/lib/libgit2.so.0.24.0 /usr/lib
#cd /usr/lib
#ln -s libgit2.so.0.24.0 libgit2.so.24
#ln -s libgit2.so.24 libgit2.so
if your output is same as below ,the problem maybe is fixed
# ldconfig -p | grep libgit2
libgit2.so.24 (libc6,x86-64) => /usr/lib64/libgit2.so.24
libgit2.so (libc6,x86-64) => /usr/lib64/libgit2.so
xiaoanyunfei commentedon May 18, 2016
@GeorgeL9
your method can fix the problem on ubuntu 14.04 ,but not on centos6.5
ochanje210 commentedon Dec 15, 2017
I had this issue on AWS ElasticBeanstalk Python platform with 64bit Amazon Linux 2017.09 v2.6.0
I was able to solve this with the following:
suhaibchishti commentedon Jul 11, 2018
On EC2, this would be the way to fix it.
$ ldconfig /usr/local/lib/
webknjaz commentedon Apr 18, 2019
@raimondi1337 this should now be addressed by
0.28.0
since it ships pre-build manylinux1 wheels.@jdavid this should probably be closed now.