/usr/bin/ld: cannot find -lpython2.7

前端 未结 2 1730
青春惊慌失措
青春惊慌失措 2020-12-14 10:38

I\'m trying to install MySQLdb with Python 2.7. The error I\'m getting looks like this:

gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wal         


        
2条回答
  •  时光说笑
    2020-12-14 11:12

    It can't find the Python library, not the executable. Run locate libpython2.7.a to see where your Python library is located, and add it to the library path (e.g. if it is in /opt/python2.7/lib, you want to call LDFLAGS="-L/opt/python2.7/lib" make).

    The @ symbol means the file is a symbolic link; * means it's executable (these are produced by ls -F, which you might have as an alias).

提交回复
热议问题