如何在我的chef-solo角色中设置python版本?
"poise-python":{
"install_python2": true,
"install_python3": true
},
python的默认值是3.5,但我想要3.6
在ubuntu 16.04上使用以下内容时出现此错误:
"poise-python":{
"install_python2": true,
"install_python3": true,
"options":{
"package_name":"python3.6"
}
},
Recipe: poise-python::default
* python_runtime[3] action install
* poise_languages_system[python3.6] action install
Running handlers:
[2017-08-01T04:48:41+00:00] ERROR: Running exception handlers
[2017-08-01T04:48:41+00:00] ERROR: Running exception handlers
Running handlers complete
[2017-08-01T04:48:41+00:00] ERROR: Exception handlers complete
[2017-08-01T04:48:41+00:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 03 seconds
[2017-08-01T04:48:41+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2017-08-01T04:48:41+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2017-08-01T04:48:41+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2017-08-01T04:48:41+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2017-08-01T04:48:41+00:00] ERROR: Package python3.6 would install nil, which does not match 3. Please set the package_name or package_version provider options.
[2017-08-01T04:48:41+00:00] ERROR: Package python3.6 would install nil, which does not match 3. Please set the package_name or package_version provider options.
[2017-08-01T04:48:41+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
[2017-08-01T04:48:41+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
答案 0 :(得分:0)
它安装了它所知道的所选提供商的最新3.x,它可以是发行版软件包,也可以是当前的SCL软件包。可能需要更新才能知道哪些操作系统有3.6可用。如果你告诉我你在哪个操作系统,我可以告诉你如何覆盖它。