ubuntu - 安装 gradle 2.11 显示为 1.10

标签 ubuntu gradle

我正在尝试在我的 ubuntu 机器上安装 Gradle,但是当我安装并尝试检查其版本时,它显示的是 1.10 而不是 2.11

我使用以下命令安装:

$  sudo apt-get install gradle
[sudo] password for ser: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  gradle
0 upgraded, 1 newly installed, 0 to remove and 159 not upgraded.
Need to get 0 B/2,554 B of archives.
After this operation, 26.6 kB of additional disk space will be used.
Selecting previously unselected package gradle.
(Reading database ... 880324 files and directories currently installed.)
Preparing to unpack .../gradle_2.11-0ubuntu1_all.deb ...
Unpacking gradle (2.11-0ubuntu1) ...
Setting up gradle (2.11-0ubuntu1) ...

但是版本说是1.10
$ gradle -version

------------------------------------------------------------
Gradle 1.10
------------------------------------------------------------

Build time:   2013-12-17 09:28:15 UTC
Build number: none
Revision:     36ced393628875ff15575fa03d16c1349ffe8bb6

Groovy:       1.8.6
Ant:          Apache Ant(TM) version 1.9.2 compiled on July 8 2013
Ivy:          2.2.0
JVM:          1.7.0_55 (Oracle Corporation 24.55-b03)
OS:           Linux 3.13.0-77-generic amd64

如何解决这个问题。

我试图删除 gradle 并重新安装它,但同样的问题。
sudo apt-get remove gradle

最佳答案

我遇到过同样的问题。看一下
/usr/lib/gradle
如果您看到多个版本文件夹,则必须手动删除每个文件夹,例如
sudo apt-get remove --auto-remove gradle-1.10
然后就可以正常安装gradle了。

关于ubuntu - 安装 gradle 2.11 显示为 1.10,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35792063/

相关文章:

perl - 为什么我在升级到 Intrepid Ibex Ubuntu 后找不到 Perl 模块?

git - 我到底应该把 .GitIgnore 文件放在 Android Studio 项目中的什么地方

gradle - Spring 靴大战

azure - Azure Pipelines 任务 Gradle@3 和 Gradle@2 之间有什么区别?

java - 带有 Spring Boot 2 错误的 Kotlin JPA 插件

html - 将html转换为pdf时出现wkhtmltopdf分页问题

linux - 无法在 AWS Amazon Ubuntu 上打开端口

ubuntu - 在 Ubuntu 中将 CELERY 作为守护进程运行

windows - 与 Windows dir 命令相比,为什么运行 opendir、readdir、stat 这么慢?

java - IntelliJ IDEA 中三个 java 模块的项目设置,其中一个用作另外两个模块的模块