0

我是 Linux 新手,我试图安装 Maven

sudo apt-get install maven

我遇到了这个错误

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?

在谷歌上我发现我必须做

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

并遵循

现在完成上述清理后,我尝试再次安装

sudo apt-get install maven

但现在我收到以下不同的错误:-(

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:~$ 

我累了

sudo apt-get update

但它不起作用我目前正在使用“Ubuntu 14.10”。请帮忙

4

1 回答 1

1

试试这个:

sudo apt-get -f install

这将导致 apt 扫描和修复丢失的依赖项,并从为您的系统配置的存储库中修复它们。在此之后再次尝试安装 maven。

于 2015-12-18T22:19:34.037 回答