我正在尝试在Centos上安装pygit2并收到以下错误
如果有人可以提出错误建议,我将不胜感激

谢谢

You are using pip version 7.1.0, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting pygit2
/usr/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Using cached pygit2-0.25.1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/tmp/pip-build-uSxy32/pygit2/setup.py", line 60, in <module>
        from _run import ffi, preamble, C_KEYWORDS
      File "pygit2/_run.py", line 72, in <module>
        ffi.cdef(C_HEADER_SRC)
      File "/usr/lib64/python2.6/site-packages/cffi/api.py", line 97, in cdef
        self._parser.parse(csource, override=override)
      File "/usr/lib64/python2.6/site-packages/cffi/cparser.py", line 154, in parse
        self._internal_parse(csource)
      File "/usr/lib64/python2.6/site-packages/cffi/cparser.py", line 159, in _internal_parse
        ast, macros = self._parse(csource)
      File "/usr/lib64/python2.6/site-packages/cffi/cparser.py", line 126, in _parse
        self.convert_pycparser_error(e, csource)
      File "/usr/lib64/python2.6/site-packages/cffi/cparser.py", line 148, in convert_pycparser_error
        raise api.CDefError(msg)
    cffi.api.CDefError: cannot parse "typedef int64_t git_time_t;"
    :640: Multiple type specifiers with a type tag

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-uSxy32/pygit2

最佳答案

查看https://github.com/libgit2/pygit2/issues/470,看来您需要首先运行:

pip install --upgrade pip

pip upgrade pycparser

关于python - 在CentO上安装pygit2时出错,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/43867185/

10-10 04:40