Trying to build an AMI using packer from an base ami available online (preferably ubuntu 12.04 precise). Looking for provisioner definition for java 8 installation. I have coupled multiple installations and executed it has went through well. But, java8 using ppa is not happening with following commands in the definition. With chef its happening without any troubles, but i want to do it with packer provisioners.
"sudo apt-get install python-software-properties",
"sudo apt-add-repository ppa:webupd8team/java",
"sudo apt-get install oracle-java8-installer".
Other alternatives i tried :
sudo apt-get update sudo apt-get software-properties-common sudo apt-get install software-properties-common sudo add-apt-repository ppa:webupd8team/java sudo apt-get install oracle-java8-installer
Reference: http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html
https://askubuntu.com/questions/445536/unable-to-locate-package-add-apt-repository-error
Please do help me with provisioner definitions if u found any successful implementations.
error:
root@ubuntu:/home/xyzqwerty# sudo apt-get install oracle-java8-installer
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package oracle-java8-installer