从源代码构建时出现Python 2.7.6错误:gcc.orig:directory":没有这样的文件或目录

Mat*_*sen 2 python rhel python-2.7

在工作中我已经配置了一个非常简单的RHEL 4.4; 例如,它没有安装java或gcc.

我已按照本指南成功在另一个VM(RHEM 4.6)上安装python 2.7.6.但是在这个新的虚拟机上,我不能make没有得到这个错误:

gcc -pthread -c -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes  -I. -IInclude -I./Include   -DPy_BUILD_CORE \
          -DSVNVERSION="\"`LC_ALL=C echo Unversioned directory`\"" \
          -DHGVERSION="\"`LC_ALL=C `\"" \
          -DHGTAG="\"`LC_ALL=C `\"" \
          -DHGBRANCH="\"`LC_ALL=C `\"" \
          -o Modules/getbuildinfo.o ./Modules/getbuildinfo.c
gcc.orig: directory": No such file or directory
<command-line>: warning: missing terminating " character
./Modules/getbuildinfo.c: In function â_Py_svnversionâ:
./Modules/getbuildinfo.c:63: error: missing terminating " character
./Modules/getbuildinfo.c:63: error: expected expression before â;â token
make: *** [Modules/getbuildinfo.o] Error 1
Run Code Online (Sandbox Code Playgroud)

我尝试了这个不相关的错误报告中的建议:

SVNVERSION="Unversioned directory"
./configure
make
Run Code Online (Sandbox Code Playgroud)

但收到了同样的错误.

我在超级用户身上看到了这个问题,建议检查目录中svnversion命令的输出Modules,但我没有svnsvnversion在这台机器上.这也表明,以编辑功能_PY_svnversionModules/getbuildinfo.c,我做到了,但收到了同样的错误.

有任何想法吗?

Mat*_*sen 6

好的我在我的案例中找到了答案:

问题configure将使用vi 创建一个新的Makefile 编辑Makefile.

搜索SVNVERSION并将其设置为

SVNVERSION=    "" 
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

make 然后会工作.