How do you install ant in Linux using apt-get command?
Here is a tutorial to learn how to install ant using apt-get command.
Step 1: Open terminal with su access and enter the command as shown below:
apt-get install ant -y
Step 2: After completion, the install command exits and instructs the user to restart the running instances of ant if it is running already.
Result of the Command Execution shown below:
root@hiox:~ apt-get install ant -y
Reading package lists...
Building dependency tree...
Reading state information...
The following packages were automatically installed and are no longer required:
bzflag server libdbusmenu qt2 libopenal1 plasma widget kimpanel backend ibus
sane utils libproc processtable perl aspell en libxcb aux0
libdevel symdump perl libextlib ruby libsm dev libgd text perl python gnome2
libgweather1 syslinux libnet daemon perl libnumber compare perl
gnome media common libical0 libc client2007e libwpd8c2a libsys cpuload perl
nagios plugins basic gir1.0 glib 2.0 dnsmasq base python notify
pure ftpd common libnet ssleay perl libjson ruby1.8 libgsf 1 common
libgnomeprintui2.2 common libkonq5 templates libcrypt openssl rsa perl
libqca2 xfonts 75dpi libndesk dbus1.0 cil python pyorbit libmtp8 rpm2cpio
libgutenprint2 gnome js common pure ftpd mysql libsilcclient 1.1 3
libxcb atom1 erlang crypto postgresql 8.4 libyaml tiny perl libido 0.1 0
python gnomedesktop llvm libice dev lp solve libgail18 libwxbase2.8 0
bzrtools realpath libdigest sha1 perl btnx config libunique 1.0 0
libfilesys df perl gnome media libcupsppdc1 ttf dejavu extra metacity
telepathy gabble libhal storage1 libnet ip perl libdb4.7 java nautilus
libopenid ruby xfonts scalable libunshield0 libgnome2 0 libcompizconfig0
lib32gomp1 libwebkit 1.0 common libatlas3gf base bind9 host libpolkit qt 1 0
libproc process perl libconvert tnef perl gamin libgd graph3d perl
libio stringy perl aspell libsensors4 libnet dns perl gnome session bin
libxklavier16 libxxf86dga1 libnet dbus perl libxine1 x libcupscgi1
calibre bin libmeanwhile1 libgucharmap7 libgnomecanvas2 0 poppler utils
libsnmp15 genisoimage hunspell en us erlang xmerl preview latex style
libreadonly perl texlive libdmraid1.0.0.rc16 libclone perl libpthread stubs0
libnunit2.4 cil libpam unix2 esound clients smbclient libbonobo2 common
libilmbase6 screen resolution extra libcupsdriver1 libgd gd2 perl
libindicate qt0 libqca2 plugin ossl libfile chmod perl libotf0
gnome mime data doc base libcfitsio3 zenity bzflag data libxml parser perl
gnome panel data obexd client x11 utils liburi perl libddccontrol0
libpangomm 1.4 1 re2c libstomp ruby1.8 libsox fmt base libproj0 libotr2
libtie ixhash perl rrdtool desktop file utils libglpng pulseaudio
libspectre1 x11 xkb utils libgnomeui 0 libcairo perl mysql server
gstreamer0.10 alsa libhtml parser perl bind9utils libossp uuid perl
libgnome window settings1 libmixlib log ruby1.8 libecal1.2 7 libbeagle1
libdesktop agnostic fdo glib libsane libplasma geolocation interface4
libgtkmm 2.4 1c2a libnet xwhois perl odbcinst1debian1 gnome settings daemon
libqt4 test libsub name perl icedtea netx libhyphen0 erlang syntax tools
cmake data libfile pushd perl libftgl2 avant window navigator data
liblouis data libfile find rule perl libcompress bzip2 perl
libreadonly xs perl libgmime 2.0 2a libibus1 ddccontrol db libpst4 mutt
libparse debianchangelog perl libcrypt ssleay perl xterm libxcb xtest0
alacarte libboost program options1.40.0 libnm util1 libuuid perl gnome menus
libmono cairo2.0 cil libxcb xv0 unshield libsox fmt alsa
gnome system monitor libbonobo2 0 libxdg basedir1 libtdb1 libdbi perl
libvte common phonon libsctp1 libfile which perl libgnomevfs2 common ncftp
libndesk dbus glib1.0 cil libxcb xinerama0 libgupnp 1.0 3 libqwt5 qt4
libjson xs perl libdevel stacktrace perl nvidia current modaliases
foomatic filters libmime tools perl libgl2ps0 libpcap0.8 screen
libstring shellquote perl libfont afm perl oxygen icon theme libpisock9
libdns64 m4 liblog log4perl perl gconf2 libgdata google1.2 1 dbconfig common
librpmio0 libjson perl libogdi3.2 librpm0 pulseaudio module x11 libwps 0.1 1
libmagick++2 rpm common librrd4 libflac++6 ttf opensymbol libedata cal1.2 6
python gnomecanvas libdshconfig1 libipc sharelite perl
libswt gnome gtk 3.5 jni libslp1 whois java wrappers libdotconf1.0
libcommons cli java python awn libhtml template perl libavdevice52
libnotify1 libpoppler qt4 3 libstartup notification0 libjs prototype
clamav base fortune mod evolution common libexiv2 6 boinc manager
mysql server core 5.1 odbcinst libdesktop agnostic vfs gio
libperl6 junction perl liblapack3gf libclamav6 libcanberra gtk module
libfcgi perl libcwidget3 libcanberra0 libxcb image0 libawn1
libmono addins0.2 cil php5 gd libgweather common libgadu3 xorg docs core
x11proto kb dev python awn extras texlive bibtex extra libwavpack1
libqt4 opengl chromium bsu data libisccc60 network manager pptp
libmono system runtime2.0 cil pptp linux libgtkhtml editor common
metacity common libdspam7 gstreamer0.10 plugins good m17n db toshset
libfile mmagic perl cpu checker libdatetime timezone perl php mail mime
libfile slurp perl libdesktop agnostic0 libc6 i386 libid3 3.8.3c2a
libopenssl ruby libdesktop agnostic cfg gconf k3b data
libmail rfc822 address perl libgamin0 libsnmp base lib32gcc1
libqt4 xmlpatterns libpcrecpp0 libnova 0.12 2 libhdf5 openmpi 1.8.4 tcsh
indicator sound unixodbc erlang runtime tools libhtml tree perl
librsvg2 common procmail ssh import xtrans dev python gmenu libindicate4
ruby1.8 libwnck22 php xml serializer libsolidcontrolifaces4 spamc
libdevkit power gobject1 libsexy2 libalut0 libavahi core6 libxcb event1
libnet cidr perl libxcrypt1 python paramiko samba common librecode0
libiec61883 0 xinput libelf1 libforms1 libyaml 0 2 libxres1
libmailtools perl libcairomm 1.0 1 libgdata common libsdl image1.2
libqt4 help sbox dtc libxcb icccm1 libgd graph perl libnss mysql bg php pear
xbitmaps blt x11proto input dev python glade2 ruby libgp11 0
python desktop agnostic libgirepository1.0 0 uno libs3 libclucene0ldbl rtkit
gnome about libpulse browse0 libsoap lite perl libgnome desktop 2 17
libexempi3 liblwres60 shared desktop ontologies ttf uralic schedtool
libijs 0.35 libt1 5 libgnome2 common libedataserverui1.2 8 libsilc 1.1 2 bzr
libparams util perl libcurl3 bzflag client libjs scriptaculous xfonts base
libfli1 libchef ruby libfltk1.1 hal liberubis ruby1.8
pulseaudio esound compat dwm libesd0 libparams validate perl
virtuoso nepomuk liblouis0 libept0 libwxgtk2.8 0 libpam mysql
libqimageblitz4 libpanel applet2 0 python vobject iputils arping
libedata book1.2 2 libfile tail perl phonon backend xine x11 xfs utils
python xdg mysql client core 5.1 libenchant1c2a libgnomevfs2 0 mlmmj
libvtk5.2 mlock libopenmpi1.3 libcolamd2.7.1 libnm glib2 libxt dev
kdepimlibs data libvte9 libglc0 indicator messages libsystemu ruby1.8
libjson ruby xulrunner 1.9.2 modemmanager libgnomecups1.0 1 libhmac ruby1.8
libmixlib config ruby apport symptoms libevent 1.4 2 python cairo
libohai ruby gnome applets data libopenexr6 libpulse mainloop glib0
libegroupwise1.2 13 libglade2.0 cil icoutils libxerces c28 erlang mnesia
libgsf 1 114 libgtop2 common librarian0 libspeexdsp1 x11 xserver utils
libswt gtk 3.5 jni libieee1284 3 rarian compat libnet server perl libhdf4 0
wodim python2.6 dev libgeos c1 libart2.0 cil rsync postgresql common
erlang public key libdbd mysql perl mousetweaks libgnomeprint2.2 data
gir1.0 gstreamer 0.10 libbind9 60 libneon27 gnutls libxapian15
libdatetime perl liblog dispatch perl gir1.0 freedesktop audacity data
kstars data libabstract ruby1.8 libdjvulibre21 pax libglade2 0 proj data
libxine1 console libswt cairo gtk 3.5 jni lesstif2 postfix mysql
python chardet libcanberra gtk0 libgnomekbd4 postgresql python rsvg
libsys cpu perl libio string perl libmixlib config ruby1.8 libstomp ruby
xfonts 100dpi libspeechd2 esound common postgresql client 8.4 libqt4 svg
libcompress raw zlib perl ppp libglib perl xdg utils netpbm liberror perl
xinit libdcmtk1 libdatetime locale perl webalizer python utidylib
gstreamer0.10 pulseaudio libgnome media0 libdv4 libhtml format perl
libxau dev rpm python configobj librpmbuild0 libtask weaken perl
chromium bsu nautilus data libev3 libphonon4 libcpan inject perl
libmixlib log ruby libfs6 sox libzip1 libfreezethaw perl ssh gstreamer0.10 x
libblas3gf libtext glob perl fglrx modaliases libxss1 libtotem plparser17
libgd2 xpm mysql client libhunspell 1.2 0 libkephal4 proj bin
nvidia 96 modaliases update motd libnuma1 libdata compare perl tcl8.4 tcl8.5
libindi0 libdc1394 22 libqt4 assistant ure erlang inets libming1 libgtop2 7
libgeos 3.1.0 ttf dejavu emacsen common libxine1 misc plugins libplrpc perl
ksysguardd yelp dmz cursor theme libm17n 0 libdecoration0 libgeoip1
libperl5.10 libgnomeui common libxxf86misc1 m17n contrib wwwconfig common
libibverbs1 libgupnp igd 1.0 2 php xml parser libstatgrab6 libsocket6 perl
mhonarc libisccfg60 libdbd pg perl usbutils smartdimmer libxvmc1
gnome desktop data clamav freshclam libc ares2 libupower glib1 libattica0
tk8.4 tk8.5 libnautilus extension1 libmail dkim perl libanthy0
libcamel1.2 14 librsvg2 2 libbonoboui2 0 python gst0.10 libsoundtouch1c2
libwnck common app install data libconvert uulib perl libgksu2 0
postgresql client common libdb4.6 libnetpbm10 libdb4.7 libatspi1.0 0
libxml xpath perl fortunes min texlive latex extra libpq5 libgfortran3
xfonts mathml python gnomeapplet libgpgme11 libart 2.0 2
evolution data server common liblaunchpad integration1 libstreams0
libid3tag0 libqt4 webkit libio multiplex perl evolution data server libepub0
imagemagick texlive latex extra doc libhtml tagset perl libcommons lang java
libzephyr4 gnome user guide erlang ssl libgraphite3 exiv2 libmusicbrainz4c2a
texlive pictures libx11 dev libnetaddr ip perl kdelibs5 data libwpg 0.1 1
libgc1c2 quassel data libcurl3 gnutls liblist moreutils perl hal info
libchef ruby1.8 libclass accessor perl libvamp hostsdk3 libmixlib cli ruby
dictionaries common openoffice.org common libintl perl
libcpan checksums perl kdebase data capplets data libmail spf perl
samba common bin libgnome menu2 libwww perl libcommon sense perl
netcat traditional libebackend1.2 0 libruby1.8 scrollkeeper dvd+rw tools
libsieve2 1 libmixlib cli ruby1.8 libqt4 scripttools php crypt cbc
gir1.0 atk 1.0 python xkit libdjvulibre text libisc60 libavahi gobject0
dbus x11 libswt gtk 3.5 java autotools dev libsox1a libcupsmime1
libnet libidn perl libnice0 libgtk2.0 cil compiz core libhdf4 0 alt
libxcb1 dev libimlib2 libopenssl ruby1.8 libxcb shape0
libconvert binhex perl libmetacity private0 libopenjpeg2 libbonoboui2 common
libloudmouth1 0 libssh 4 texlive math extra libjs jquery perlmagick
libxcb shm0 kdebase runtime data min12xxw texlive pictures doc libaudit0
rlwrap libxcb property1 libio socket ssl perl nvidia 173 modaliases
p7zip full mscompress openjdk 6 jre libossp uuid16 php mail mimedecode
libiodbc2 libpam gnome keyring libgdata1.2 1 ucspi tcp iptables
liblog4j1.2 java librsync1 python feedparser openbsd inetd bcmwl modaliases
mysql server 5.1 gnome icon theme libclass singleton perl libnet1
libohai ruby1.8 python dateutil libmldbm perl x11proto core dev python gtk2
freeglut3 python gconf python crypto libxml twig perl libaspell15
libdigest hmac perl libgssdp 1.0 2 libmsn0.3 gnome doc utils libxine1 bin
libxdmcp dev libtidy 0.99 0 libpthread stubs0 dev libfcgi0ldbl
pulseaudio utils python libxml2 libedataserver1.2 11 libxkbfile1
libgnomecanvas2 common libunix syslog perl libminc2 1 libxcb randr0
libcrypt openssl bignum perl spamassassin mysql client 5.1
telepathy mission control 5 libllvm2.7 libasound2 plugins libnids1.21
libpisync1 libextlib ruby1.8 erlang base libnetcdf4 libstreamanalyzer0
liberubis ruby libio socket inet6 perl libopenid ruby1.8 libgnomekbd common
libebook1.2 9 libgtksourceview2.0 common libswt mozilla gtk 3.5 jni libxine1
libaudiofile0 python gweather
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
ant gcj ant optional ant optional gcj gcj 4.4 base gcj 4.4 jre lib libgcj bc
libgcj common libgcj10 libjaxp1.3 java libxerces2 java
Suggested packages:
default jdk java compiler java sdk ant doc libbsf java liboro java
libxalan2 java junit libregexp java jython antlr libbcel java
libcommons logging java libjdepend java libgnumail java
libxml commons resolver1.1 java libcommons net java libjsch java javacc
libgcj10 dbg libgcj10 awt libjaxp1.3 java gcj libxerces2 java doc
libxerces2 java gcj
The following NEW packages will be installed:
ant ant gcj ant optional ant optional gcj gcj 4.4 base gcj 4.4 jre lib
libgcj bc libgcj common libgcj10 libjaxp1.3 java libxerces2 java
0 upgraded, 11 newly installed, 0 to remove and 40 not upgraded.
Need to get 0B/30.1MB of archives.
After this operation, 81.8MB of additional disk space will be used.
Selecting previously deselected package libjaxp1.3 java.
(Reading database ... (Reading database ... 5%(Reading database ... 10%(Reading database ... 15%(Reading database ... 20%(Reading database ... 25%(Reading database ... 30%(Reading database ... 35%(Reading database ... 40%(Reading database ... 45%(Reading database ... 50%(Reading database ... 55%(Reading database ... 60%(Reading database ... 65%(Reading database ... 70%(Reading database ... 75%(Reading database ... 80%(Reading database ... 85%(Reading database ... 90%(Reading database ... 95%(Reading database ... 100%(Reading database ... 162988 files and directories currently installed.)
Unpacking libjaxp1.3 java (from .../libjaxp1.3 java_1.3.04 5ubuntu3_amd64.deb) ...
Selecting previously deselected package libxerces2 java.
Unpacking libxerces2 java (from .../libxerces2 java_2.9.1 4ubuntu1_all.deb) ...
Selecting previously deselected package ant.
Unpacking ant (from .../ant_1.7.1 4ubuntu1.1_all.deb) ...
Selecting previously deselected package libgcj common.
Unpacking libgcj common (from .../libgcj common_1%3a4.4.3 1ubuntu1_all.deb) ...
Selecting previously deselected package gcj 4.4 base.
Unpacking gcj 4.4 base (from .../gcj 4.4 base_4.4.3 1ubuntu4.1_amd64.deb) ...
Selecting previously deselected package libgcj10.
Unpacking libgcj10 (from .../libgcj10_4.4.3 1ubuntu4.1_amd64.deb) ...
Selecting previously deselected package libgcj bc.
Unpacking libgcj bc (from .../libgcj bc_4.4.3 4ubuntu1_amd64.deb) ...
Selecting previously deselected package ant gcj.
Unpacking ant gcj (from .../ant gcj_1.7.1 4ubuntu1.1_amd64.deb) ...
Selecting previously deselected package ant optional.
Unpacking ant optional (from .../ant optional_1.7.1 4ubuntu1.1_all.deb) ...
Selecting previously deselected package ant optional gcj.
Unpacking ant optional gcj (from .../ant optional gcj_1.7.1 4ubuntu1.1_amd64.deb) ...
Selecting previously deselected package gcj 4.4 jre lib.
Unpacking gcj 4.4 jre lib (from .../gcj 4.4 jre lib_4.4.3 1ubuntu4.1_all.deb) ...
Processing triggers for man db ...
Setting up libjaxp1.3 java (1.3.04 5ubuntu3) ...
Setting up libxerces2 java (2.9.1 4ubuntu1) ...
Setting up ant (1.7.1 4ubuntu1.1) ...
Setting up libgcj common (1:4.4.3 1ubuntu1) ...
Setting up gcj 4.4 base (4.4.3 1ubuntu4.1) ...
Setting up ant optional (1.7.1 4ubuntu1.1) ...
Processing triggers for python central ...
Setting up libgcj10 (4.4.3 1ubuntu4.1) ...
Setting up libgcj bc (4.4.3 4ubuntu1) ...
Setting up ant gcj (1.7.1 4ubuntu1.1) ...
Setting up ant optional gcj (1.7.1 4ubuntu1.1) ...
Setting up gcj 4.4 jre lib (4.4.3 1ubuntu4.1) ...
Processing triggers for libc bin ...
ldconfig deferred processing now taking place
root@hiox:~