apt-get logo

Experience the following?:

Hit http://us.archive.ubuntu.com trusty-backports/multiverse Translation-en    
Hit http://us.archive.ubuntu.com trusty-backports/restricted Translation-en    
Hit http://us.archive.ubuntu.com trusty-backports/universe Translation-en      
Ign http://us.archive.ubuntu.com trusty/main Translation-en_US                 
Ign http://us.archive.ubuntu.com trusty/multiverse Translation-en_US           
Ign http://us.archive.ubuntu.com trusty/restricted Translation-en_US           
Ign http://us.archive.ubuntu.com trusty/universe Translation-en_US             
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/trusty-updates/main/i18n/Translation-en  Hash Sum mismatch
E: Some index files failed to download. They have been ignored, or old ones used instead.

The cause is likely a corrupt package file previously downloaded. You can fix it by doing the following:

sudo rm -rf /var/lib/apt/lists/*
sudo apt-get update

If you administer a lot of Ubuntu machines in many different locations, odds are you’ve been in the situation where you need to install a package,
and in this case more specifically openjdk-6-jre, withou access to the internet or any apt repository.

The simplest way to do this is to manually install using a .deb package (syntax: sudo dpkg -i package_name.deb ), although that will mean you will have to meet some strict dependencies, which in itself can become a nightmare to figure out.

There is another way and it’s simpler than you think – although some functionality might not be available. If you simply want to be able to execute ‘java’ with some parameters, for example generating reports from your web application, then read on..
Continue reading