/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lpython2.7 collect2: error: ld returned 1 exit status
我正在使用 cygwin
,尝试安装 sentry
并遇到此错误?
谁能告诉我为什么会遇到这个问题,这个问题与 python-dev
包有关吗?
如果需要的话,如何在 cygwin 上安装 python-dev ?
最佳答案
要搜索包含文件的包,您可以使用cygcheck
或https://cygwin.com/packages/
在您的情况下使用 cygcheck:
$ cygcheck -p libpython2.7.dll.a
Found 3 matches for libpython2.7.dll.a
python-devel-2.7.12-1 - python-devel: Python language interpreter (installed binaries and support files)
python-2.7.10-1 - python: Python language interpreter (installed binaries and support files)
python2-devel-2.7.13-1 - python2-devel: Python 2 language interpreter
因此您需要使用 Cygwin Setup
安装 python2-devel
软件包
因为它是具有正确文件的最后一个版本。
不要对 Cygwin 安装程序
中已提供的软件包使用 pip install
关于python - 找不到lpython2.7,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43271403/