cómo instalar ANT en ubuntu 14.04


13

Soy nuevo en Ubuntu e intento instalar Apache ANT en Ubuntu

Descargué el paquete (apache-ant-1.9.4-bin.tar.gz) y en una terminal di un comando como este

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

Tengo estos dos errores

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'

y si uso

/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$

¿Cómo debo proceder?


No puede instalar un archivo .tar.gz con apt-get. Apt-get instala paquetes desde el repositorio de paquetes.
— user205301

ok, entonces, ¿cómo puedo instalar Apache ANT en Ubuntu cualquier otro paso?
— Vinodh Kumar

Publica el contenido de /etc/apt/sources.list. Hay un error en la línea 2.
— AB

Respuestas:


15

El archivo apache-ant-1.9.4-bin.tar.gzno es paquete instalable. Un paquete instalable termina con .deb.

Puede instalar ant a través del administrador de paquetes.

Pero primero debe corregir un error en su sistema:

Abra una terminal y ejecute este comando

sudo nano /etc/apt/sources.list

Eliminar la línea (línea 2)

sudo apt-get install python-software-properties$

y en la línea 35 y 36 agregue un #al principio de la línea:

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

y eliminar todo $de tusources.list

Luego ejecuta el comando:

sudo apt-get update

Luego instala la hormiga :

sudo apt-get install ant

1
Es un poco engañoso decir que .tar.gz normalmente contiene el código fuente ya que casi todas las versiones binarias genéricas para Linux también son archivos .tar.gz, como en este caso.
— user205301

Gracias AB Funciona bien ... problema resuelto. muchas gracias
— Vinodh Kumar

@ user205301 OK, eliminado
— AB

@VinodhKumar ¿Estaba satisfecho con mi respuesta? Entonces dame un voto a favor (∧). Si pudiera resolver su problema, sería bueno que marcara mi respuesta (✓). ;)
— AB

No pude votar tu respuesta. porque necesita 35 reputaciones, acepté que su respuesta es correcta.
— Vinodh Kumar

9

Simplemente: sudo apt-get install ant

Si necesita una versión más nueva, debe extraer el .tar.gz que descargó en algún lugar y ejecutar ant desde allí.

tar xzvf apache-ant-1.9.4-bin.tar.gzextrae el archivo Básicamente es solo un archivo ZIP. Puede extraerlo también gráficamente desde el navegador de archivos.


probé este comando 'sudo apt-get install ant' pero recibí este error No se puede localizar el paquete ant
— Vinodh Kumar

Intenta correr sudo apt-get updateprimero. Tengo Ubuntu 14.04 y acabo de instalar ant con apt-get, por lo que el paquete debería estar allí.
— user205301

probé sudo apt-get update, recibí este error E: El tipo 'sudo' no se conoce en la línea 2 en la lista de fuentes /etc/apt/sources.list E: La lista de fuentes no se pudo leer.
— Vinodh Kumar el

¿Cómo puede ejecutar el comando sudo apt-get updatesi hay un error? Lea la pregunta.
— AB

@AB Agregué la línea de error sources.list en las preguntas
— verifíquelo
Al usar nuestro sitio, usted reconoce que ha leído y comprende nuestra Política de Cookies y Política de Privacidad.
Licensed under cc by-sa 3.0 with attribution required.