HkFreaKuser1673718
HkFreaKuser1673718

Reputation: 757

Maven Installation in linux fails with "The following packages have unmet dependencies" error

I am new to Linux I was trying to install Maven with

sudo apt-get install maven

I hit upon this error

Do you want to continue? [Y/n] Y
Get:1 http://ubuntu.excellmedia.net/archive/ utopic-updates/main openjdk-7-jre-headless amd64 7u75-2.5.4-1~utopic1 [39.7 MB]
Fetched 1,031 B in 0s (7,897 B/s)
E: Failed to fetch http://ubuntu.excellmedia.net/archive/pool/main/o/openjdk-7/openjdk-7-jre-headless_7u75-2.5.4-1~utopic1_amd64.deb  Size mismatch

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

On googling i found out that I had to do

sudo apt-get clean
sudo apt-get autoclean
sudo apt-get autoremove

and followed that

Now after doing above clean I tried installing again with

sudo apt-get install maven

but now i am getting the following different error :-(

The following packages have unmet dependencies:
 maven : Depends: libaether-java but it is not going to be installed
         Depends: libplexus-containers1.5-java but it is not going to be installed
         Depends: libsisu-ioc-java but it is not going to be installed
         Depends: libwagon2-java (>= 2.2-2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
ubuntu@ubuntu:~$ 

I tired

sudo apt-get update

but it dint work I am currently using "Ubuntu 14.10". Plz help

Upvotes: 0

Views: 1789

Answers (1)

Ashutosh Jindal
Ashutosh Jindal

Reputation: 18869

Try this out:

sudo apt-get -f install

This will cause apt to scan and fix missing dependencies and fix them from the repositories configured for your system. Try installing maven again after this.

Upvotes: 1

Related Questions