我正在尝试在运行 Raspbian Jessie 的 Raspberry Pi 上从源代码构建和安装 python 3.6.2。以下是构建过程的过程:
$ ./configure --enable-optimizations --enable-ipv6 # everything seems fine
$ make -s -j$(nproc) # everything seems fine except for a few tests being skipped
$ make test # again, a few tests are skipped
$ sudo checkinstall -D make altinstall # FAILURE
错误是:
*snip*
running install_lib
copying build/lib.linux-armv7l-3.6/_codecs_cn.cpython-36m-arm-linux-gnueabihf.so -> /usr/local/lib/python3.6/lib-dynload
error: [Errno 2] No such file or directory
Makefile:1451: recipe for target 'sharedinstall' failed
make: *** [sharedinstall] Error 1
**** Installation failed. Aborting package creation.
Cleaning up...OK
Bye.
但是,文件确实存在,目标也是如此:
$ ls build/lib.linux-armv7l-3.6/_codecs_cn.cpython-36m-arm-linux-gnueabihf.so
build/lib.linux-armv7l-3.6/_codecs_cn.cpython-36m-arm-linux-gnueabihf.so
$ ls /usr/local/lib/python3.6
config-3.6m-arm-linux-gnueabihf lib-dynload
基本上,wtf。我曾尝试在 Makefile 和 setup.py 中四处寻找,但实际上没有时间完全理解整个构建过程。这里会发生什么?我应该放弃使用 checkinstall 吗?欢迎任何建议。
请您参考如下方法:
事实证明这是一个 checkinstall 错误,具有某种描述。我硬着头皮运行 sudo make altinstall 一切顺利。我仔细研究了 checkinstall,它似乎有一些……棘手的错误。我不会把它贴上“错误”的标签,它在大多数情况下都运行良好,但有时会出错,而且似乎对此无能为力。
