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?!

2
  • 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 4, 2018 at 11:14
  • Does this answer your question? Need to prevent a package from being installed
    – karel
    Mar 5, 2020 at 7:51

1 Answer 1

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.

2
  • i needed to do this manually or i would ignore this in the first place!
    – Socrates
    Feb 16, 2018 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. Feb 18, 2018 at 12:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .