0

i have done this :

sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/java-8-oracle/bin/javac" 1

and this:

sudo update-alternatives --config javac

also this:

cd /var/lib/dpkg/info

sudo sed -i 's|JAVA_VERSION=8u151|JAVA_VERSION=8u162|' oracle-java8-installer.*
sudo sed -i 's|PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/|PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/8u162-b12/0da788060d494f5095bf8624735fa2f1/|' oracle-java8-installer.*
sudo sed -i 's|SHA256SUM_TGZ="c78200ce409367b296ec39be4427f020e2c585470c4eed01021feada576f027f"|SHA256SUM_TGZ="68ec82d47fd9c2b8eb84225b6db398a72008285fafc98631b1ff8d2229680257"|' oracle-java8-installer.*
sudo sed -i 's|J_DIR=jdk1.8.0_151|J_DIR=jdk1.8.0_162|' oracle-java8-installer.*

after i copied the source files to

/usr/lib/jvm/java-8-oracle

but still whenever i use apt-get it tries to download 8u151 version which runs into error. how can i, simply put, make it understand that its already installed?!

Socrates
  • 101
  • `Setting up oracle-java8-installer (8u151-1~webupd8~0) ... Using wget settings from /var/cache/oracle-jdk8-installer/wgetrc Downloading Oracle Java 8...` this is what it returns for any apt-get! how to update webupd about my newer version already installed? – Socrates Feb 04 '18 at 11:14
  • Does this answer your question? [Need to prevent a package from being installed](https://askubuntu.com/questions/99081/need-to-prevent-a-package-from-being-installed) – karel Mar 05 '20 at 07:51

1 Answers1

0

What about just removing the package oracle-java8-installer? since you have installed it manually, you don't need it. sudo apt purge oracle-java8-installer should do the trick.

Fran Marzoa
  • 675
  • 6
  • 11
  • i needed to do this manually or i would ignore this in the first place! – Socrates Feb 16 '18 at 23:26
  • I'm following you, what I mean is given the fact that you have installed Java 8 manually, you don't need the package oracle-java8-installer anymore, so you could just remove that package and problem solved. – Fran Marzoa Feb 18 '18 at 12:45