Ubuntu: i have mannualy installed java 8u162 but when i use apt-get tries to install 8u151



Question:

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


Solution:1

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.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »