SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2010-05-01 15:52:38

captainhaggy
#! Member
From: Düsseldorf, Germany
Registered: 2010-04-13
Posts: 73
Website

Command not found? Here is the solution.

Most of us know, that it can happen, we need a command / program that is not installed. Debian has a nice package called command-not-found. When you install it, and call a command / programm, that is not installed in a terminal, the os tells you, what to do to install it.

For installing, you need to do two things. At first, install the package via sudo apt-get install command-not-found and after that you must install the database via running once sudo update-command-not-found.

That's it. From now on, your os will react a little bit more intelligent.

Have fun,

Karl

P.S.: sudo apt-get install bash-completion will make it even better wink

Last edited by captainhaggy (2010-05-01 15:54:41)


internaut wordsmith nerd veggi buddhist _/|\_ ॐ मणिपद्मे हूँ
http://paper.li/c4ph
c4ph@identi.ca, c4ph@twitter.com, c4ph@telemorphix.org

Offline

Be excellent to each other!

#2 2010-05-01 18:05:03

luc
#! Die Hard
From: Munich, Germany
Registered: 2010-03-21
Posts: 561

Re: Command not found? Here is the solution.

hey captainhaggy, I suppose you are talking about Statler and not #!9.04 as the Ubuntu version already did check some repos and told me some like

The program 'something' is currently not installed. You can install it ba typing:
sudo apt-get install something
something: command not found

this was very useful cause I just had to double click on the second line , then click 3rd mouse and give my password to install the thing.

now in hope to get this behavior back on Statler I tried command-not-found, but was not very satysfied with the output as it does not provide the same convenience as on the last version of #! ANd in addition it does not know I'm a sudoer sad Only if I did sudo su and tried a command as real root it told me what to type (so I just had to copy-paste it with the third mouse-key)
Do you also know how I can get the old behavior on Statler?
Thanks in advance

Offline

#3 2010-05-01 20:19:17

captainhaggy
#! Member
From: Düsseldorf, Germany
Registered: 2010-04-13
Posts: 73
Website

Re: Command not found? Here is the solution.

The normal way to install software on debian or debian based system is to become root, done by the command  sudo -s.

Example kazehakase (a browser)
The normal useraccount get's the
The program 'kazehakase' is currently not installed.  To run 'kazehakase' please ask your administrator to install the package 'kazehakase'.

That's a normal output, because linux is a multiuser os.

But if you become root via sudo -s, the output of the software is
The program 'kazehakase' is currently not installed.  You can install it by typing:
apt-get install kazehakase

So, the command works as normal for a debian system (which normally has a root/system operator to install programs). The user gets the information, which packages are needed for the wished command, while the operator (root) gets the information, which packages he/she has to install.

Within ubuntu, you have a patched version of the package command-not-found. Because of the ubuntu philosophy you get an output as user to to run a sudo apt-get command. That behaviour is not possible with the debian packages of command-not-found. It's not the debian philosophy.

But to give a hint for installation is not the only function of the command-not-found package. Try the command kde ans look at his output.
No command 'kde' found, did you mean:
Command 'lde' from package 'lde' (main)
Command 'kded' from package 'kdelibs4c2a' (main)
Command 'kdm' from package 'kdm' (main)
Command 'kdf' from package 'kdf' (main)
Command 'ode' from package 'plotutils' (main)
Command 'tde' from package 'devtodo' (main)
kde: command not found

It's also a kind of reminder. That's it.


internaut wordsmith nerd veggi buddhist _/|\_ ॐ मणिपद्मे हूँ
http://paper.li/c4ph
c4ph@identi.ca, c4ph@twitter.com, c4ph@telemorphix.org

Offline

#4 2010-05-16 07:26:43

klaaparn
Member
Registered: 2009-09-26
Posts: 18

Re: Command not found? Here is the solution.

Semi_Hi-Jack:
Command not found might also be the glitch i our own memory, misspelling the command, or maybe one does not fully remember what the app is called, which brings me to what I use a couple of times every year:

ragnar@laptop:~$ apropos wge

I think this qualifies as a solution to the topics header!?

../Patrik

Offline

#5 2010-05-16 15:22:13

bozhkov
#! Junkie
Registered: 2009-12-29
Posts: 463

Re: Command not found? Here is the solution.

I do it via apt-cache search. Is there a significant difference?

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo