我正在嘗試從自訂存儲庫安裝自訂包。廚師客戶端運行給了我這個錯誤:
No candidate version available for ruby-2.3.3
=============================================
Error executing action `install` on resource 'yum_package[ruby-2.3.3]'
但我可以手動安裝它:
yum install ruby-2.3.3
.........
.........
===================================================================================================================
Installing:
ruby x86_64 2.3.3-1.el6 vmc-misc 16 M
Installing for dependencies:
libyaml x86_64 0.1.3-4.el6_6 vmc-base 52 k
Transaction Summary
========================================================================================================================
Install 2 Package(s)
Total download size: 16 M
Installed size: 46 M
我怎麼才能讓 Chef 安裝這個軟體包?
答案1
您只想提供名稱:
package 'ruby'
或者,如果您想指定單一版本:
package 'ruby' do
version '2.3.3'
end