msamman
Posts: 4
Joined: Tue Jan 22, 2013 7:54 am

NSLookup and dig not recognized

Sun Jan 27, 2013 1:02 am

when using either dig or nslookup commands, I get a

Code: Select all

~bash: command not found
type error.

how can I install the package to use nslookup and dig?

Thanks

kintrob
Posts: 3
Joined: Fri Dec 21, 2012 1:02 pm

Re: NSLookup and dig not recognized

Tue Jan 29, 2013 2:43 pm

Hi msamman. This should work:

Code: Select all

sudo apt-get install dnsutils

CrazyEvan
Posts: 2
Joined: Fri Feb 05, 2016 4:45 pm

Re: NSLookup and dig not recognized

Fri Feb 05, 2016 4:52 pm

To get dnsutils to work, I had to first do a

Code: Select all

sudo apt-get update
prior to

Code: Select all

sudo apt-get install dnsutils
which then worked fine, and nslookup was up and running.

B.Goode
Posts: 7401
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: NSLookup and dig not recognized

Fri Feb 05, 2016 5:03 pm

The person making the enquiry hasn't logged in for 3 years...

CrazyEvan
Posts: 2
Joined: Fri Feb 05, 2016 4:45 pm

Re: NSLookup and dig not recognized

Fri Feb 05, 2016 5:59 pm

B.Goode wrote:The person making the enquiry hasn't logged in for 3 years...
I had the exact same issue that the original poster had 3 years later, and found this page looking for a solution. I thought someone else might have the same problem and figured it couldn't hurt to keep the solution updated.

mikey32094
Posts: 37
Joined: Sat Jul 25, 2015 10:07 am

Re: NSLookup and dig not recognized

Sun Jun 05, 2016 8:04 pm

+1 that a new answer to an old question can often still be helpful, especially with linux. I came here with the same issue, and this thread solved it for me as well.

breakaway
Posts: 1
Joined: Thu Jul 21, 2016 6:13 am

Re: NSLookup and dig not recognized

Thu Jul 21, 2016 6:21 am

CrazyEvan wrote:To get dnsutils to work, I had to first do a

Code: Select all

sudo apt-get update
prior to

Code: Select all

sudo apt-get install dnsutils
which then worked fine, and nslookup was up and running.

Thanks to CrazyEvan, i'm able to get my issue resolved very quick.

I wish everybody would reply to a post (regardless of how old it is) until a good answer is found. That's the spirit of a forum, not to avoid responding to older thread. There are always newbie to Linux (because people will grow old :-D ), and they will always need answers to questions.

ksamuelson
Posts: 1
Joined: Tue Oct 18, 2016 5:50 pm

Re: NSLookup and dig not recognized

Tue Oct 18, 2016 5:56 pm

Hopefully this helps.
I have found that when "sudo apt-get install <prgm>" or "sudo apt-get update" fails it is usually a result of the Pi date being wrong. If the Pi is not getting the data via a ntp server or the server is blocked then the date will not be correct and the update may not work quite right.
try the command
date
first then if the date is not correct you can fix the ntp server settings (see many other posts) or manually set it via the command
sudo date -s '2016-10-03 18:22:00'

You can figure out the format from above or search the Internet.

fsr
Posts: 88
Joined: Wed Jan 13, 2016 2:29 am

Re: NSLookup and dig not recognized

Tue Dec 20, 2016 12:54 pm

current jessie raspian is missing dnsutils.

Code: Select all

[email protected]:/ $ date
Tue 20 Dec 12:52:46 UTC 2016
[email protected]:/ $ uname -a
Linux raspberrypi 4.4.34-v7+ #930 SMP Wed Nov 23 15:20:41 GMT 2016 armv7l GNU/Linux
[email protected]:/ $ nslookup
-bash: nslookup: command not found
[email protected]:/ $ dig
-bash: dig: command not found

User avatar
kusti8
Posts: 3441
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: NSLookup and dig not recognized

Tue Dec 20, 2016 1:01 pm

fsr wrote:current jessie raspian is missing dnsutils.

Code: Select all

[email protected]:/ $ date
Tue 20 Dec 12:52:46 UTC 2016
[email protected]:/ $ uname -a
Linux raspberrypi 4.4.34-v7+ #930 SMP Wed Nov 23 15:20:41 GMT 2016 armv7l GNU/Linux
[email protected]:/ $ nslookup
-bash: nslookup: command not found
[email protected]:/ $ dig
-bash: dig: command not found
So can't you just install it?
There are 10 types of people: those who understand binary and those who don't.

smokingwheels
Posts: 33
Joined: Sun Dec 25, 2016 3:11 am

Re: NSLookup and dig not recognized

Sun Jan 21, 2018 6:04 pm

I had the nslookup problem.

I fixed it by doing this after reading this post

Code: Select all

apt-get install dnsutils
apt-get update
apt-get install dnsutils
Error on IP address first time around.

Code: Select all

apt-get install dnsutils
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libproxy-tools vlc-plugin-pulse
Use 'apt-get autoremove' to remove them.
Suggested packages:
  rblcheck
The following NEW packages will be installed:
  dnsutils
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 114 kB of archives.
After this operation, 361 kB of additional disk space will be used.
Err http://mirrordirector.raspbian.org/raspbian/ jessie/main dnsutils armhf 1:9.9.5.dfsg-9+deb8u14
  404  Not Found [IP: 93.93.128.193 80]
E: Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/b/bind9/dnsutils_9.9.5.dfsg-9+deb8u14_armhf.deb  404  Not Found [IP: 93.93.128.193 80]

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
[email protected]:~# apt-get update
Hope that helps.

rockingh0rse
Posts: 1
Joined: Sat Apr 28, 2018 1:42 pm

Re: NSLookup and dig not recognized

Sat Apr 28, 2018 1:45 pm

Absolutely perfect. This reply fro Jan 2018 sorted me out!

Respond to old threads - yep, no problem with that - provided it adds value.

Return to “Troubleshooting”