在apt-get安装之前,如何接受Lience协议?

我正在摆弄使用ansible来设置我的机器和我选择的配置/应用程序等…我已经遇到了一个绊脚石和它的许可协议。 我一直在尝试使用debconf来预先接受它。

这是蒸汽源中的相关文件之一: http : //bazaar.launchpad.net/~ubuntu-branches/ubuntu/utopic/steam/utopic/view/head :/ debian/preinst

我试过echo steam steam/question select "I AGREE" | sudo debconf-set-selections echo steam steam/question select "I AGREE" | sudo debconf-set-selections和一大堆其他非常相似的命令也涉及尝试设置许可证。

这是sudo debconf-show steam的输出: steam/purge: * steam/license: * steam/question: I AGREE

我尝试过的所有内容都导致我认为我已经不同意许可协议,我必须在安装Steam之前删除这些条目。 有没有人有任何想法?

使用您的研究和post评论中提供的链接,我想出了这一点。 截至15.04(2015-09-24),Ubuntu存储库中的steam包仍为1.0.0.48,但需要1.0.0.50才能正确读取debconf设置。

我发现你可以从Steam下载页面下载的steam.deb是1.0.0.50,所以如果从这个文件安装,使用debconf设置,它应该可以工作。

我使用saltstack,这是我的蒸汽工作状态:

 steam: debconf.set: - data: steam/question: {'type': 'select', 'value': 'I AGREE'} steam/license: {'type': 'note', 'value': ''} pkg.installed: - sources: - steam-launcher: https://steamcdn-a.akamaihd.net/client/installer/steam.deb - require: - debconf: steam 

如原始问题中所述,您可以在尝试安装Steam之前使用命令行设置所需的值。

 echo steam steam/question select "I AGREE" | sudo debconf-set-selections echo steam steam/license note '' | sudo debconf-set-selections 

软件包中可能存在一个错误(如果不是您的主要责任,那么打包是非常困难的),以后的版本现在应该工作并从debconf数据库中读取预先接受的许可证。 这意味着您不应该收到提示。

 sudo apt-get install steam 

典型格式如下:

 echo package package/key {boolean,string} {true, some string} | sudo debconf-set-selections sudo apt-get install package 

对此有用的问答是https://unix.stackexchange.com/a/106553