git - 致命的 : Not a git repository when installing mod_python

标签 git mod-python

我正在尝试安装 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/

相关文章:

git - 无法在@INC 中找到 Git.pm

git - 我如何从原始 repo 的克隆推送到我的 fork ?

python - Mod_python 不产生输出

android - Gradle 同步失败 : Process 'command ' git'' finished with non-zero exit value 69

git - 将 git 存储库移动到 nfs 会导致权限错误

git - Git 和 GitHub 的区别

php - mod_php、mod_python、mod_Language 是如何工作的

python - XP 与 C :\python in path won't run files in C:\python

python - 我可以使用 mod_python 在 Apache 服务器上运行 Flask 吗?

python - Django、mod_python、apache 和古怪的 session