Author Topic: sudo: add-apt-repository: command not found  (Read 10279 times)

Christopher

  • Guest
sudo: add-apt-repository: command not found
« on: April 28, 2016, 05:48:12 AM »
 Hello Team,

I have just purchased  Ubuntu VPS and trying to intsall java on it and getting below error while adding Java repo to server .

Code: [Select]
root@chris:~# sudo add-apt-repository ppa:webupd8team/java
sudo: add-apt-repository: command not found

Please help me to resolve this issue .

Thanks,
Chris

Offline Scott Anderson

  • Administrator
  • Newbie
  • *****
  • Posts: 5
  • Country: us
  • Karma: +0/-0
Re: sudo: add-apt-repository: command not found
« Reply #1 on: April 28, 2016, 06:01:45 AM »
Hello Christopher,

Try below Command

Code: [Select]
sudo apt-get update
sudo apt-get install software-properties-common
sudo apt-get install python-software-properties


and then run the command

Code: [Select]
sudo add-apt-repository ppa:webupd8team/java
Try this and if you are still facing the issue let us know.


Scott
Hostripples - Affordable web hosting
https://hostripples.com
https://hostripples.in
https://hostripples.co.uk
Hostripples.com $1 Unlimited Hosting

Christopher

  • Guest
Re: sudo: add-apt-repository: command not found
« Reply #2 on: April 28, 2016, 06:05:17 AM »
Thanks Scott for the solution .


The issue has been resolved .

Code: [Select]
root@chris:~# add-apt-repository ppa:webupd8team/java
 Oracle Java (JDK) Installer (automatically downloads and installs Oracle JDK7 / JDK8 / JDK9). There are no actual Java files in this PPA.

More info (and Ubuntu installation instructions):
- for Oracle Java 7: http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
- for Oracle Java 8: http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html

Debian installation instructions:
- Oracle Java 7: http://www.webupd8.org/2012/06/how-to-install-oracle-java-7-in-debian.html
- Oracle Java 8: http://www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html

Important!!! For now, you should continue to use Java 8 because Oracle Java 9 is available as an early access release (it should be released in 2016)! You should only use Oracle Java 9 if you explicitly need it, because it may contain bugs and it might not include the latest security patches! Also, some Java options were removed in JDK9, so you may encounter issues with various Java apps. More information and installation instructions (Ubuntu / Linux Mint / Debian): http://www.webupd8.org/2015/02/install-oracle-java-9-in-ubuntu-linux.html
 More info: https://launchpad.net/~webupd8team/+archive/ubuntu/java
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keyring `/tmp/tmpqb4kt28r/secring.gpg' created
gpg: keyring `/tmp/tmpqb4kt28r/pubring.gpg' created
gpg: requesting key EEA14886 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpqb4kt28r/trustdb.gpg: trustdb created
gpg: key EEA14886: public key "Launchpad VLC" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
OK


 :)