自动同意 sudo apt-get -y install oracle-java7-installer 上的许可协议 [英] Auto yes to the License Agreement on sudo apt-get -y install oracle-java7-installer

查看:45
本文介绍了自动同意 sudo apt-get -y install oracle-java7-installer 上的许可协议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

适用于 Ubuntu 的 Oracle Java 包以交互方式询问许可协议.所以我每次都必须说好"然后是",但我想让它自动化.我要做的是:

The Oracle Java package for Ubuntu interactively asks about the License Agreement. So I have to say 'OK' and then 'yes' every time, but I'd like to automate it. What I do is this:

sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
sudo apt-get -y install oracle-java7-installer 

是否有一种简单的方法可以在不使用 expect 的情况下实现协议流程的自动化?

Is there a simple way to automate the agreement process without using expect?

推荐答案

试试这个:

sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections
echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-set-selections
sudo apt-get -y install oracle-java7-installer 

在我的 debian 7.1 上运行第三个和第四个命令有帮助,所以我认为同样可以在 ubuntu 上帮助

running 3rd and 4th command on my debian 7.1 helps, so I think the same can help on ubuntu as well

这篇关于自动同意 sudo apt-get -y install oracle-java7-installer 上的许可协议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆