2017-07-27 4 views
0

シェフのソロの役割でpythonのバージョンを設定するにはどうすればいいですか?poise-pythonを使って自分のシェフのソロでpythonのバージョンを設定するには

"poise-python":{ 
     "install_python2": true, 
     "install_python3": true 
    }, 

のpythonのデフォルトは3.5ですが、私はUbuntuの16.04で、以下の使用している場合3.6

が、私はこのエラーを取得したい:

"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

それはそれが知っている、最新の3.xのをインストールします選択されたプロバイダの場合はディストリビューションパッケージまたはSCLのいずれかになります。おそらく、どのOSが利用可能かを知るために更新する必要があります3.6。あなたがどのOSを使用しているか教えてくれたら、それを上書きする方法を教えてください。

+0

ubuntu 14.04 AND 16.04 – Tampa

+0

14.04では3.6パッケージ、16.04では 'options package_name: 'python3.6''のように変更することができます。私は16.04のために私がチャンスを得るときに物事を更新するつもりです。 – coderanger

+0

「package_name: 'python3.6'のオプションはどこに置くのですか?私は私の役割のjsonオブジェクトに置くことを望んでいました..ちょうど16.04のためには大丈夫です – Tampa

関連する問題