我通过yum在我的AWS Elastic Beanstalk实例上安装了cmake3:
packages:
yum:
cmake3: []然而,当运行一个需要cmake的pip安装时,我得到了一个错误:
FileNotFoundError: [Errno 2] No such file or directory: 'cmake': 'cmake'
如何为cmake设置cmake3的别名?我已经尝试了以下方法,但它导致了相同的错误消息。
container_commands:
01_link_cmake:
command: "ln -s /usr/bin/cmake3 /usr/bin/cmake"我不安装cmake: []的原因是因为我需要版本3。
发布于 2021-10-21 15:49:58
我已经解决了。我意识到pip包安装发生在ln -s容器命令之前。因此,即使我的别名发生了,也为时已晚。
相反,我需要做的是
container_commands:
01_link_cmake:
command: ln -s /usr/bin/cmake3 /usr/bin/cmake
02_upgrade_pip:
command: "python -m pip install --upgrade pip"
leader_only: true
03_install_package:
command: "python -m pip install <package that requires cmake>"
leader_only: truehttps://stackoverflow.com/questions/69656931
复制相似问题