![E:软件包‘maven2’没有安装候选项](https://linux22.com/image/994018/E%EF%BC%9A%E8%BD%AF%E4%BB%B6%E5%8C%85%E2%80%98maven2%E2%80%99%E6%B2%A1%E6%9C%89%E5%AE%89%E8%A3%85%E5%80%99%E9%80%89%E9%A1%B9.png)
我正在尝试安装 mavensudo apt-get install maven2
应该非常简单,但我得到了这个:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package maven2 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
maven
E: Package 'maven2' has no installation candidate
有什么提示吗?
谢谢
答案1
maven2
软件包位于 Universe 存储库中http://packages.ubuntu.com/search?keywords=maven2. 因此,您需要启用 universe repo。
然后使用
sudo apt-get update
更新软件索引。
然后使用
sudo apt-get install maven2
安装它