Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] how to install 'host'?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
jedihawk
n00b
n00b


Joined: 06 Jul 2010
Posts: 13

PostPosted: Wed Dec 08, 2010 3:22 am    Post subject: [SOLVED] how to install 'host'? Reply with quote

Greetings experts,

I tried this:

Code:
bigserver ~ # host google.com
bash: host: command not found


And as you can see, that didn't work. So I tried this:

Code:
bigserver ~ # emerge host

 * IMPORTANT: 1 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.

Calculating dependencies... done!

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) net-dns/host-991529
>>> Downloading 'http://distfiles.gentoo.org/distfiles/host.tar.Z'
--2010-12-07 17:19:57--  http://distfiles.gentoo.org/distfiles/host.tar.Z
Resolving distfiles.gentoo.org... 149.20.20.135, 156.56.247.195, 204.152.191.39, ...
Connecting to distfiles.gentoo.org|149.20.20.135|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://mirrors.kernel.org/gentoo/distfiles/host.tar.Z [following]
--2010-12-07 17:19:57--  http://mirrors.kernel.org/gentoo/distfiles/host.tar.Z
Resolving mirrors.kernel.org... 204.152.191.39, 149.20.20.135
Reusing existing connection to distfiles.gentoo.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 184455 (180K) [application/x-tar]
Saving to: `/usr/portage/distfiles/host.tar.Z'

100%[=====================================================================================================================================================================>] 184,455     --.-K/s   in 0.08s

2010-12-07 17:19:57 (2.34 MB/s) - `/usr/portage/distfiles/host.tar.Z' saved [184455/184455]

 * host.tar.Z RMD160 SHA1 SHA256 size ;-) ...                                                                                                                                                           [ ok ]
 * checking ebuild checksums ;-) ...                                                                                                                                                                    [ ok ]
 * checking auxfile checksums ;-) ...                                                                                                                                                                   [ ok ]
 * checking miscfile checksums ;-) ...                                                                                                                                                                  [ ok ]
 * This profile has not been tested thoroughly and is not considered to be
 * a supported server profile at this time.  For a supported server
 * profile, please check the Hardened project (http://hardened.gentoo.org).

 * This profile is merely a convenience for people who require a more
 * minimal profile, yet are unable to use hardened due to restrictions in
 * the software being used on the server. This profile should also be used
 * if you require GCC 4.1 or Glibc 2.4 support. If you don't know if this
 * applies to you, then it doesn't and you should probably be using
 * Hardened, instead.

 * CPV:  net-dns/host-991529
 * REPO: gentoo
 * USE:  amd64 elibc_glibc kernel_linux multilib userland_GNU

>>> Unpacking source...
>>> Unpacking host.tar.Z to /var/tmp/portage/net-dns/host-991529/work
>>> Source unpacked in /var/tmp/portage/net-dns/host-991529/work
>>> Compiling source in /var/tmp/portage/net-dns/host-991529/work ...
make -j3 CC=x86_64-pc-linux-gnu-gcc 'COPTS=-O2 -pipe'
x86_64-pc-linux-gnu-gcc -O2 -pipe -DHOST_RES_SEND  -I. -I.   -c -o main.o main.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -DHOST_RES_SEND  -I. -I.   -c -o info.o info.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -DHOST_RES_SEND  -I. -I.   -c -o list.o list.c


x86_64-pc-linux-gnu-gcc -O2 -pipe -DHOST_RES_SEND  -I. -I.   -c -o addr.o addr.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -DHOST_RES_SEND  -I. -I.   -c -o geth.o geth.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -DHOST_RES_SEND  -I. -I.   -c -o util.o util.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -DHOST_RES_SEND  -I. -I.   -c -o misc.o misc.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -DHOST_RES_SEND  -I. -I.   -c -o test.o test.c
util.c: In function 'print_answer':
util.c:801: warning: format '%d' expects type 'int', but argument 2 has type 'long unsigned int'
x86_64-pc-linux-gnu-gcc -O2 -pipe -DHOST_RES_SEND  -I. -I.   -c -o file.o file.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -DHOST_RES_SEND  -I. -I.   -c -o send.o send.c
x86_64-pc-linux-gnu-gcc -O2 -pipe -DHOST_RES_SEND  -I. -I.   -c -o vers.o vers.c
x86_64-pc-linux-gnu-gcc  -o host main.o info.o list.o addr.o geth.o util.o misc.o test.o file.o send.o vers.o -lresolv
>>> Source compiled.
>>> Test phase [not enabled]: net-dns/host-991529

>>> Install host-991529 into /var/tmp/portage/net-dns/host-991529/image/ category net-dns
>>> Completed installing host-991529 into /var/tmp/portage/net-dns/host-991529/image/

strip: x86_64-pc-linux-gnu-strip --strip-unneeded -R .comment
   usr/bin/hostx
ecompressdir: bzip2 -9 /usr/share/man

>>> Installing (1 of 1) net-dns/host-991529

>>> Recording net-dns/host in "world" favorites file...
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.

 * IMPORTANT: 1 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.


And that seems to have worked. Now let's try it again...

Code:
bigserver ~ # host google.com
bash: host: command not found


Wait a sec... I'm right back where I started. What am I doing wrong here?


Last edited by jedihawk on Wed Dec 08, 2010 7:00 pm; edited 2 times in total
Back to top
View user's profile Send private message
wthrowe
Tux's lil' helper
Tux's lil' helper


Joined: 19 Aug 2009
Posts: 141

PostPosted: Wed Dec 08, 2010 4:07 am    Post subject: Reply with quote

I remember being confused by that for a long time. It turns out that net-dns/host is some strange nonstandard host tool, so the ebuild renames the binary to host-woods to avoid conflicts. You can use that, but more likely you want to install net-dns/bind-tools, which provides the standard host command.
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3664

PostPosted: Wed Dec 08, 2010 11:12 am    Post subject: Re: how to install 'host'? Reply with quote

jedihawk wrote:
Code:
bigserver postfix # host google.com
bash: host: command not found
To find the executable commands of 'host', try
Code:
$ equery f host | grep bin
Back to top
View user's profile Send private message
jedihawk
n00b
n00b


Joined: 06 Jul 2010
Posts: 13

PostPosted: Wed Dec 08, 2010 6:49 pm    Post subject: 'emerge net-dns/bind-tools' works for 'host' Reply with quote

wthrowe wrote:
I remember being confused by that for a long time. It turns out that net-dns/host is some strange nonstandard host tool, so the ebuild renames the binary to host-woods to avoid conflicts. You can use that, but more likely you want to install net-dns/bind-tools, which provides the standard host command.


Hey, that works perfectly!

One question for you: how did you find this out?
Back to top
View user's profile Send private message
jedihawk
n00b
n00b


Joined: 06 Jul 2010
Posts: 13

PostPosted: Wed Dec 08, 2010 6:59 pm    Post subject: Re: how to install 'host'? Reply with quote

charles17 wrote:
jedihawk wrote:
Code:
bigserver postfix # host google.com
bash: host: command not found
To find the executable commands of 'host', try
Code:
$ equery f host | grep bin


Good info! Thanks for the tip.
Back to top
View user's profile Send private message
wthrowe
Tux's lil' helper
Tux's lil' helper


Joined: 19 Aug 2009
Posts: 141

PostPosted: Wed Dec 08, 2010 7:45 pm    Post subject: Re: 'emerge net-dns/bind-tools' works for 'host' Reply with quote

jedihawk wrote:
One question for you: how did you find this out?

I don't remember exactly where I found that; it was a while ago. Something through Google, I'm sure. Maybe this: http://en.gentoo-wiki.com/wiki/BIND#Troubleshooting_Your_Configuration
Back to top
View user's profile Send private message
SunMar
n00b
n00b


Joined: 15 Nov 2004
Posts: 33
Location: The Netherlands

PostPosted: Fri May 17, 2013 8:59 am    Post subject: Reply with quote

Though a very old thread, I was looking for 'host' too. I did remember that the "host" package wasn't the one I needed, but couldn't remember which one I did need and found this thread via Google. Though the proposed solution of using the "host" package is fine, the common host tool is provided in the bind-tools package (along with dig, nslookup, nsupdate and dnssec-keygen).

Code:
emerge --ask bind-tools
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum