как установить ANT в Ubuntu 14.04

Я новичок в Ubuntu и пытаюсь установить Apache ANT в Ubuntu

Я скачал пакет (apache-ant-1.9.4-bin.tar.gz) и в терминале дал подобная команда

sudo apt-get install apache-ant-1.9.4-bin.tar.gz

Я получил эти две ошибки

E: Unable to locate package apache-ant-1.9.4-bin.tar.gz
E: Couldn't find any package by regex 'apache-ant-1.9.4-bin.tar.gz'

, и если я использую

/etc/apt/sources.list

1   deb-src http://ppa.launchpad.net/klaus-vormweg/bluefish/ubuntu trusty main$
 2  sudo apt-get install python-software-properties$
 3  # deb cdrom:[Ubuntu 14.04 LTS _Trusty Tahr_ - Release amd64 (20140417)]/ trusty main restricted$
 4  $
 5  # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to$
 6  # newer versions of the distribution.$
 7  $
 8  ## Major bug fix updates produced after the final release of the$
 9  ## distribution.$
10  $
11  ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu$
12  ## team. Also, please note that software in universe WILL NOT receive any$
13  ## review or updates from the Ubuntu security team.$
14  $
15  ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu $
16  ## team, and may not be under a free licence. Please satisfy yourself as to $
17  ## your rights to use the software. Also, please note that software in $
18  ## multiverse WILL NOT receive any review or updates from the Ubuntu$
19  ## security team.$
20  $
21  ## N.B. software from this repository may not have been tested as$
22  ## extensively as that contained in the main release, although it includes$
23  ## newer versions of some applications which may provide useful features.$
24  ## Also, please note that software in backports WILL NOT receive any review$
25  ## or updates from the Ubuntu security team.$
26  $
27  $
28  ## Uncomment the following two lines to add software from Canonical's$
29  ## 'partner' repository.$
30  ## This software is not part of Ubuntu, but is offered by Canonical and the$
31  ## respective vendors as a service to Ubuntu users.$
32  deb http://archive.canonical.com/ubuntu trusty partner$
33  deb-src http://archive.canonical.com/ubuntu trusty partner$
34  $
35   This software is not part of Ubuntu, but is offered by third-party$
36  developers who want to ship their latest software.$
37  deb http://extras.ubuntu.com/ubuntu trusty main$
38  deb-src http://extras.ubuntu.com/ubuntu trusty main$
39  deb http://archive.ubuntu.com/ubuntu trusty universe main multiverse restricted$
40  deb-src http://archive.ubuntu.com/ubuntu trusty universe main restricted multiverse #Added by software-properties$
41  deb http://security.ubuntu.com/ubuntu/ trusty-security universe main multiverse restricted$
42  deb http://archive.ubuntu.com/ubuntu trusty-updates universe main multiverse restricted$
43  deb http://archive.ubuntu.com/ubuntu trusty-proposed universe main multiverse restricted$
44  deb http://archive.ubuntu.com/ubuntu trusty-backports universe main multiverse restricted$

Как мне поступить?

13
задан 20 April 2015 в 09:21

2 ответа

Файл apache-ant-1.9.4-bin.tar.gz не является устанавливаемым пакетом. Устанавливаемый пакет заканчивается .deb.

можно установить муравей через диспетчер пакетов.

, Но сначала необходимо исправить ошибку в системе:

Открывают терминал и работают, эта команда

sudo nano /etc/apt/sources.list

Удаляют строку (строка 2)

sudo apt-get install python-software-properties$

и в строке 35, и 36 добавляют # в начале строки:

# This software is not part of Ubuntu, but is offered by third-party
# developers who want to ship their latest software.

и удаляют весь $ от Вашего sources.list

, Затем выполняет команду:

sudo apt-get update

Затем установка муравей :

sudo apt-get install ant
12
ответ дан 20 April 2015 в 19:21

Просто: sudo apt-get install ant

при необходимости в более новой версии затем, необходимо извлечь .tar.gz, на который Вы загрузили где-нибудь и выполнили муравья оттуда.

tar xzvf apache-ant-1.9.4-bin.tar.gz извлечения архив. Это - в основном просто архив ZIP. Можно извлечь его также графически из файлового браузера.

8
ответ дан 20 April 2015 в 19:21

Другие вопросы по тегам:

Похожие вопросы: