I need to install
Java 1.7 on several machines and hence I want to do it using a script. The problem is the installation asks for certain options (to be specific 'Y', then 'OK' and finally 'Yes'). I came across this question:
I am pretty sure the process is on the same lines. But I don't know how did the OP know about the variable names (?) like
postfix postfix/mailname etc.
If someone can provide a more direct answer, it will be most appreciated.
I tried setting
sudo dpkg-reconfigure debconf to
non-interactive and selecting alert level as
critial. Then I tried to execute
sudo apt-get install oracle-java7-installer and got this error:
Need to get 0 B/18.6 kB of archives. After this operation, 193 kB of additional disk space will be used. Preconfiguring packages ... (Reading database ... 47992 files and directories currently installed.) Unpacking oracle-java7-installer (from .../oracle-java7-installer_7u51-0~webupd8~4_all.deb) ... oracle-license-v1-1 license could not be presented try 'dpkg-reconfigure debconf' to select a frontend other than noninteractive dpkg: error processing /var/cache/apt/archives/oracle-java7-installer_7u51-0~webupd8~4_all.deb (--unpack): subprocess new pre-installation script returned error exit status 2 Errors were encountered while processing: /var/cache/apt/archives/oracle-java7-installer_7u51-0~webupd8~4_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1)