Fetch error installing Java on Ubuntu 11.04. Solved!

I am running Ubuntu 11.04 and was trying to install the Java OpenJDK 6.0 (and 7.0) on my system but I received the following error:


Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

I tried installing several different Java packages but all of them failed with the same error. Finally, I arrived at a working solution by running the following commands:


sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update

Now you can successfully install Java on your system!


sudo apt-get install openjdk-6-jre-headless -y

See also  How to Run a Script at Startup in Linux: A Step-by-Step Guide for Ubuntu, CentOS, and Debian

2 thoughts on “Fetch error installing Java on Ubuntu 11.04. Solved!”

Leave a Comment