由于软件包损坏,Maven在ubuntu上安装失败

阿米特·库玛(Amit Kumar)

我正在尝试安装Maven,但对于损坏的软件包却报错。我也尝试使用-f开关,但没有帮助。

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.
迪米特里

尝试以下命令:

#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

如果遇到此问题:

程序“ mvn”可在以下软件包中找到:

专家

maven2

尝试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

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章