Maven install fails on ubuntu due to broken packages - maven

I am trying to install maven but getting error for broken packages. I tried with -f switch too but it did not helped.
simon#simon-pc:~$ sudo apt-get install -f maven
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
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: libwagon-java but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Try the following commands:
#sudo apt-get remove maven2
sudo add-apt-repository "deb http://ppa.launchpad.net/natecarlson/maven3/ubuntu precise main"
sudo apt-get update
sudo apt-get install maven3
If you encounter this:
The program 'mvn' can be found in the following packages:
maven
maven2
Try sudo apt-get install {selected-package}
#Just add those lines in /etc/profile
export M2_HOME=/usr/share/maven3
export M2=$M2_HOME/bin
export PATH=$M2:$PATH

Related

apt-get is broken and can't install anything

My apt-get is totally broken and can't install anything. The output of 'apt-get install -f" is as follows:
# apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
gnome-icon-theme : Depends: gtk-update-icon-cache
python3-cairo : Depends: python3 (>= 3.6~) but 3.4.3-1 is installed
python3-gdbm : Depends: python3 (>= 3.6) but 3.4.3-1 is installed
python3-reportlab-accel : Depends: python3 (>= 3.6~) but 3.4.3-1 is installed
rhythmbox : Depends: rhythmbox-data (= 3.1-1ubuntu3) but 3.4.1-2ubuntu5 is installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
The output of 'sudo apt install python3' is in the picture:https://imgur.com/a/IbGK0
I have Googled any possible questions and tried any possible solutions but NO ONE worked for it.
Go to /var/log/dist-upgrade/apt.log and identify the packages that are broken. "apt-get remove" the packages, do release upgrade and then you should be able to reinstall them.
You can find more information here: https://askubuntu.com/questions/124845/eerror-pkgproblemresolverresolve-generated-breaks-this-may-be-caused-by-hel
This command resolved my error
sudo apt -f install
In my case I was behind a proxy, so I needed to run the following command:
sudo nano /etc/apt/apt.conf
And added the following lines:
Acquire::http::proxy "http://<user>:<password>#<proxy_host>:<proxy_port>/";
Acquire::https::proxy "https://<user>:<password>#<proxy_host>:<proxy_port>/";
Acquire::ftp::proxy "ftp://<user>:<password>#<proxy_host>:<proxy_port>/";

maven installations on ubuntu fails

I am running Ubuntu 14.10 on VMPlayer 6.0.4 here on ubuntu when I am trying to install maven i am getting the following errors.
ubuntu#ubuntu:~$ sudo apt-get install maven
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
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:~$
As I am new to Linux I am not understanding why its failing and how to solve this.
After googling I tried
i)apt-get update (success)
ii)apt-get upgrade (failed as below)
ubuntu#ubuntu:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
liboxideqt-qmlplugin liboxideqtcore0 linux-generic linux-headers-generic linux-image-generic oxideqt-codecs
0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
ubuntu#ubuntu:~$
but still same issue
It would be helpful if someone suggestion me how to fix and install maven
Thanks in advance
May be too late to answer, but I had same issue on Ubuntu 12.04 LTS -- so this may be helpful
Here is a work around...
sudo dpkg -i --force-all /var/cache/apt/archives/libwagon2-java_2.2-3+nmu1_all.deb
The command above will install: libwagon2-java_2.2-3+nmu1_all.deb
After this you will be able to install Maven by: $ sudo apt-get install maven
Update your packages by
sudo apt-get update
then try to install.

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
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.

Depends: openjdk-7-jre-headless (= 7u75-2.5.4-1~deb7u1) but it is not going to be installed

i want to install Openjdk but i get this error :
root#debian~# apt-get install openjdk-7-jdk
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
openjdk-7-jdk : Depends: openjdk-7-jre (= 7u75-2.5.4-1~deb7u1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
i try this commands by my issue still not solved :
sudo apt-get install -f
sudo dpkg --configure -a
sudo apt-get clean
sudo apt-get update
how should i fix this ?
try
sudo apt-get install tzdata=2014j-0wheezy1
sudo apt-get install openjdk-7-jdk

Installing Opencpu via apt-get install, not working

I just ran an apt-get install, and this is the output I get.
$ sudo apt-get install opencpu
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package opencpu
Anybody else run into problems installing opencpu in Ubuntu 14.04 (LTS)?
You need to add the opencpu-1.5 ppa repository first:
sudo add-apt-repository ppa:opencpu/opencpu-1.5
sudo apt-get update
sudo apt-get install opencpu
Have a look at the server manual for more detailed instructions.

Resources