我正在尝试安装 mod_python 但出现错误:
SyntaxError: ('EOL while scanning string literal', ('/usr/local/lib/python2.7/dist-packages/mod_python/version.py', 3, 79, 'version = "fatal: Not a git repository (or any of the parent directories): .git\n'))
这是 mod_python 中使用的 version.sh 文件。
#!/bin/sh
MPV_PATH="`dirname $0`/../src/include/mp_version.h"
MAJ=`awk '/MP_VERSION_MAJOR/ {print $3}' $MPV_PATH`
MIN=`awk '/MP_VERSION_MINOR/ {print $3}' $MPV_PATH`
PCH=`awk '/MP_VERSION_PATCH/ {print $3}' $MPV_PATH`
GIT=`git describe --always`
echo $MAJ.$MIN.$PCH-$GIT
我手动运行它然后我得到:
fatal: Not a git repository (or any of the parent directories): .git
3.4.1-
这是什么意思?请帮忙!!
谢谢!
最佳答案
version.sh
文件假定您是从 git 安装的。这似乎是一个错误。
要修复它,您可以删除该行
GIT=`git describe --always`
并将下一行更改为
echo $MAJ.$MIN.$PCH
关于git - 致命的 : Not a git repository when installing mod_python,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20022952/