2016-02-01 152 views
0

我在Ubuntu上運行Ubuntu 14.10 VMPlayer 6.0.4,當我嘗試安裝maven時,我收到以下錯誤。ubuntu上的maven安裝失敗

[email protected]:~$ 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. 
[email protected]:~$ 

因爲我是Linux新手,我不理解爲什麼它的失敗以及如何解決這個問題。 谷歌搜索後,我試圖

i)apt-get update (success) 
ii)apt-get upgrade (failed as below) 
[email protected]:~$ 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. 
[email protected]:~$ 

但還是同樣的問題 這將是有益的,如果有人建議我如何修復和安裝Maven提前 感謝

回答

0

可能來不及回答,但我有同樣的在Ubuntu 12.04 LTS的問題 - 所以這可能是有益的

這裏是一個變通......

sudo dpkg -i --force-all /var/cache/apt/archives/libwagon2-java_2.2-3+nmu1_all.deb 

上面的命令將安裝:libwagon2-java_2.2-3+nmu1_all.deb

此之後,你就可以通過安裝Maven的:$ sudo apt-get install maven

0

更新你的包被

sudo apt-get update 

然後嘗試安裝。