当我尝试在 NetBSD 5.1 上编译 Python 3.2 时,出现奇怪的错误:
python ./Objects/typeslots.py < ./Include/typeslots.h > ./Objects/typeslots.inc
python: not found
*** Error code 127
我究竟做错了什么?
我正在尝试以通常的方式编译Python:
./configure
make
su
make install
答案1
由于某种原因,您在此过程中必须访问touch
一些文件make
。当 make 因错误 127 退出时,运行:
touch ./Include/typeslots.h
touch ./Objects/type
touch ./Objects/typeslots.py
make
Python 源目录内部。
它会第二次抱怨:
./Python/makeopcodetargets.py ./Python/opcode_targets.h
env: python: No such file or directory
再次,仅touch
删除有问题的文件并make
再次运行。
touch ./Python/makeopcodetargets.py
touch ./Python/opcode_targets.h
make
答案2
现在(自 2012 年 5 月起)位于 pkgsrc 中 --lang/python32