我无法将 maven 更新到最新版本,截至撰写本文时为 3.8.6:
$ mvn --version
Apache Maven 3.6.3
Maven home: /usr/share/maven
Java version: 17.0.5, vendor: Private Build, runtime: /usr/lib/jvm/java-17-openjdk-amd64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.15.0-53-generic", arch: "amd64", family: "unix"
$ sudo apt-get update
Hit:1 https://repo.saltproject.io/py3/ubuntu/20.04/amd64/archive/3004.1 focal InRelease
Get:2 https://download.docker.com/linux/ubuntu focal InRelease [57.7 kB]
Hit:3 http://ppa.launchpad.net/linuxuprising/shutter/ubuntu focal InRelease
Hit:4 http://de.archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:5 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:6 http://de.archive.ubuntu.com/ubuntu focal-security InRelease
Hit:7 http://ppa.launchpad.net/blaze/rtbth-dkms/ubuntu focal InRelease
Hit:8 http://de.archive.ubuntu.com/ubuntu focal InRelease
Hit:9 http://de.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:10 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu focal InRelease
Hit:13 https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/focal pgadmin4 InRelease
Hit:11 https://scala.jfrog.io/artifactory/debian all InRelease
Ign:12 https://scala.jfrog.io/artifactory/debian InRelease
Hit:14 https://scala.jfrog.io/artifactory/debian Release
Fetched 57.7 kB in 2s (25.6 kB/s)
Reading package lists... Done
$ sudo apt-get --only-upgrade install maven
Reading package lists... Done
Building dependency tree
Reading state information... Done
maven is already the newest version (3.6.3-1).
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
好像找不到更新的版本。有什么想法吗?
答案1
您需要自行安装最新版本。
这可能会帮助你做到这一点。
答案2
apt 包尚未更新。您必须等待它更新,或者尝试从 maven 本身查找包。