我正在尝试使用pythonbrew安装python 2.6但是在运行命令时收到了一些错误
pythonbrew install --configure="--enable-unicode=ucs4" 2.6
我在Archlinux下运行并在该机器上使用python2.7很长一段时间。但我需要在我的机器上安装2.6和2.7,所以pythonbrew安装似乎没问题。
这是错误:
Parser/pgen ./Grammar/Grammar ./Include/graminit.h ./Python/graminit.c
Parser/pgen ./Grammar/Grammar ./Include/graminit.h ./Python/graminit.c
gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude I./Include -fPIC -DPy_BUILD_CORE -o Python/symtable.o Python/symtable.c
gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -fPIC -DPy_BUILD_CORE -o Python/compile.o Python/compile.c
gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -fPIC -DPy_BUILD_CORE -o Python/graminit.o Python/graminit.c
gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -fPIC -DPy_BUILD_CORE -DSVNVERSION=\"`LC_ALL=C svnversion .`\" -o Modules/getbuildinfo.o ./Modules/getbuildinfo.c
gcc: error: directory": No such file or directory
make: *** [Modules/getbuildinfo.o] Error 1
答案 0 :(得分:3)
找到此here的解决方案。基本上svnversion
的行为在某些时候发生了变化,并且解决方法是在构建python 2.6.2时在路径中放置一个名为svnversion
的脚本
#!/bin/sh
echo exported
答案 1 :(得分:0)
虽然我不知道导致此错误的原因,但可以通过使用Python 2.6.8来解决此问题:
pythonbrew install --configure="--enable-unicode=ucs4" 2.6.8