sprinkmeier
Posts: 410
Joined: Mon Feb 04, 2013 10:48 am

some help with "command not found" errors

Sat May 11, 2013 1:55 am

So you're running a script of some kind which fails on a missing command:

Code: Select all

pi@gatepie ~ $ ./SomeScript.sh 
./SomeScript.sh: line 2: uuencode: command not found
yup... it's missing alright.

Code: Select all

pi@gatepie ~ $ uuencode
uuencode: command not found
There's a helper to identify mising commands:

Code: Select all

pi@gatepie ~ $ sudo apt-get install command-not-found 
Reading package lists... Done

[...]

You need to run 'update-command-not-found' as root to update the cache.
update it's database:

Code: Select all

pi@gatepie ~ $ sudo update-command-not-found 
Downloading complete file http://mirrordirector.raspbian.org/raspbian/dists/wheezy/main/Contents-armhf.gz

OK, you might need to log out and back in again for this to work

Code: Select all

pi@gatepie ~ $ uuencode
The program 'uuencode' is currently not installed.  To run 'uuencode' please ask your administrator to install the package 'sharutils'
if you're root it will even tell you how to do that:

Code: Select all

root@gatepie ~ # uuencode
The program 'uuencode' is currently not installed.  You can install it by typing:
apt-get install sharutils
uuencode: command not found
there's even a sort of spell-checker in case you mostly remember the name of a command:

Code: Select all

pi@gatepie ~ $ dhcp
No command 'dhcp' found, did you mean:
 Command 'dicp' from package 'dish' (main)
 Command 'hcp' from package 'lam4-dev' (main)
 Command 'chcp' from package 'nilfs-tools' (main)
 Command 'dhcpd' from package 'isc-dhcp-server' (main)
 Command 'dccp' from package 'dcap' (main)
dhcp: command not found
pi@gatepie ~ $

SimonSmall
Posts: 220
Joined: Tue Oct 09, 2012 8:13 pm

Re: some help with "command not found" errors

Sat May 11, 2013 11:26 am

Ooohh - good call. I'll try this later :D

User avatar
recantha2
Posts: 380
Joined: Wed Nov 14, 2012 9:34 am
Location: Potton, Bedfordshire

Re: some help with "command not found" errors

Thu May 16, 2013 8:04 am

Sweet :-) Will feature on my blog
--
Michael Horne - @recantha on Twitter
Raspberry Pi Pod blog - http://www.recantha.co.uk/blog
Cambridge Raspberry Jam - https://camjam.me
Pi Wars - https://piwars.org

Return to “Beginners”