Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to install JRE in Debian Linux.I tried this command and it got installed successfully,

apt-get install sun-java6-jre

after that the /usr/lib/jvm got deleted from me unintentionally.Now when I am trying to install it using the same command it is giving me the message that no new packages are installed as JRE is already installed.
The problem is I am not able to install the new JRE and also not able to use the previously installed as /usr/lib/jvm got deleted from me

share|improve this question

migrated from stackoverflow.com Aug 16 '11 at 8:41

This question came from our site for professional and enthusiast programmers.

2 Answers 2

The key word here is --reinstall:

apt-get install --reinstall sun-java6-jre
share|improve this answer
    
Reading package lists... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 120 not upgraded. Need to get 0B/6378kB of archives. After this operation, 0B of additional disk space will be used. Do you want to continue [Y/n]? y WARNING: The following packages cannot be authenticated! sun-java6-jre Install these packages without verification [y/N]? y Preconfiguring packages ... (Reading database ... 91852 files and directories currently installed.) Preparing to replace sun-java6-jre 6.26-1 (using .../sun-java6-jre_6.26-1_all.deb) ... –  Amandeep Singh Aug 16 '11 at 7:42
    
But still its not working out for me –  Amandeep Singh Aug 16 '11 at 7:43

Remove the installation using:

sudo apt-get remove sun-java6-jre

and then try installing again.

share|improve this answer
    
ar01:/usr/lib/jvm# sudo apt-get remove sun-java6-jre sudo: unable to resolve host ar01 Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: sun-java6-bin sun-java6-jre 0 upgraded, 0 newly installed, 2 to remove and 120 not upgraded. After this operation, 101MB disk space will be freed. Do you want to continue [Y/n]? y (Reading database ... 91253 files and directories currently installed.) Removing sun-java6-bin ... Removing sun-java6-jre ... Processing triggers for menu ... –  Amandeep Singh Aug 16 '11 at 8:05
    
Then by running r=this command I get :ar01:/usr/lib/jvm# apt-get install sun-java6-jre Reading package lists... Done Building dependency tree Reading state information... Done sun-java6-jre is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 120 not upgraded. ar01:/usr/lib/jvm# sudo apt-get remove sun-java6-jre sudo: unable to resolve host ar01 Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: 0 upgraded, 0 newly installed, 2 to remove and 120 not upgraded. Do you want to continue [Y/n]? y –  Amandeep Singh Aug 16 '11 at 8:08
    
. Unpacking sun-java6-bin (from .../sun-java6-bin_6.26-1_amd64.deb) ... sun-dlj-v1-1 license has already been accepted Processing triggers for menu ... Setting up sun-java6-jre (6.26-1) ... Setting up sun-java6-bin (6.26-1) ... Processing triggers for menu ... –  Amandeep Singh Aug 16 '11 at 8:09
    
But still when I execute java -version it could not execute it –  Amandeep Singh Aug 16 '11 at 8:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.