Package Details: command-not-found 0.5.0-1

Git Clone URL: https://aur.archlinux.org/command-not-found.git (read-only)
Package Base: command-not-found
Description: In case a command could not be found this utility searches for packages containing this or a similar command (bash,zsh).
Upstream URL: http://github.com/metti/command-not-found
Licenses: GPL
Submitter: msquared
Maintainer: justin8
Last Packager: justin8
Votes: 156
Popularity: 3.734504
First Submitted: 2011-09-10 22:42
Last Updated: 2016-05-17 09:31

Dependencies (8)

Required by (0)

Sources (1)

Latest Comments

msquared commented on 2016-05-13 07:55

looks like the version 0.4.5 is broken for gcc6. most likely due to the standard default change in gcc6. the trunk version compiles fine. I will provide a release soon.

hashworks commented on 2016-05-12 09:57

Build fails for me on 2 different devices.

/tmp/command-not-found/src/command-not-found-0.4.5/src/db.cpp:190:24: Fehler: expected primary-expression before »>« token
shared_ptr<Database> d;
^
/tmp/command-not-found/src/command-not-found-0.4.5/src/db.cpp:190:26: Fehler: »d« wurde in diesem Gültigkeitsbereich nicht definiert
shared_ptr<Database> d;
^
CMakeFiles/cnf.dir/build.make:62: die Regel für Ziel „CMakeFiles/cnf.dir/db.cpp.o“ scheiterte
make[2]: *** [CMakeFiles/cnf.dir/db.cpp.o] Fehler 1
CMakeFiles/Makefile2:104: die Regel für Ziel „CMakeFiles/cnf.dir/all“ scheiterte
make[1]: *** [CMakeFiles/cnf.dir/all] Fehler 2
Makefile:149: die Regel für Ziel „all“ scheiterte
make: *** [all] Fehler 2
==> FEHLER: Ein Fehler geschah in build().
Breche ab...

justin8 commented on 2016-04-15 23:12

@bobi Not automatically sadly

bobi commented on 2016-04-15 13:16

@justin8: is there any way to automate a cnf rebuild on every boost update?

justin8 commented on 2015-11-10 22:20

@shazde please don't mark as out of date when it isn't. You need to recompile all AUR packages that depend on boost when it gets updated.

msquared commented on 2015-10-11 18:48

this tool is discontinued. the prebuilt catalogs will soon be unavailable and are not updated anymore. if anyone has interest to take over, please contact me.

orbital_sfear commented on 2014-12-10 19:02

cnf-lookup: error while loading shared libraries: libboost_system.so.1.55.0: cannot open shared object file: No such file or directory

It looks like I had to recompile this package after boost updates:
packer -S command-not-found

After that, the error went away.

Det commented on 2014-12-10 18:58

No, you just need to rebuild it.

orbital_sfear commented on 2014-12-10 18:58

cnf-lookup: error while loading shared libraries: libboost_system.so.1.55.0: cannot open shared object file: No such file or directory

It looks like this package should be updated to use the new boost lib. Here is a workaround I'm using until its updated:
cd /usr/lib
sudo ln -s libboost_system.so.1.57.0 libboost_system.so.1.55.0
sudo ln -s libboost_regex.so.1.57.0 libboost_regex.so.1.55.0
sudo ln -s libboost_filesystem.so.1.57.0 libboost_filesystem.so.1.55.0

jmontano commented on 2014-02-18 16:21

cnf-mirror MIRROR="http://mirror.hatcolorsoft.com" is not working therefore it can't do first sync and find any "not-found" command

donniezazen commented on 2014-01-10 05:37

Pardon me. I had to add following to .bashrc get it to work.

source /usr/share/doc/pkgfile/command-not-found.bash
[ -r /etc/profile.d/cnf.sh ] && . /etc/profile.d/cnf.sh

donniezazen commented on 2014-01-10 05:34

I have installed pkgfile and command-not-found. I have following in my .bashrc.

source /usr/share/doc/pkgfile/command-not-found.bash

I still get command not found. I have used this previously but it is not working on my current system. I have tried manually sourcing command-not-found.bash. Still no luck.

https://wiki.archlinux.org/index.php/Zsh#The_.22command_not_found.22_hook
https://wiki.archlinux.org/index.php/Pkgfile

Det commented on 2013-10-06 18:11

It's only sourced on login, hence it will not work on children shells.

Even the Wiki for Zsh suggests sourcing it from ~/.zshrc: https://wiki.archlinux.org/index.php/Zsh#The_.22command_not_found.22_hook

E: There's quite a good response in Ask Ubuntu: http://askubuntu.com/a/247769

Det commented on 2013-10-06 18:09

It's only sourced on login, hence it will not work on children shells.

Even the Wiki for Zsh suggests sourcing it from ~/.zshrc: https://wiki.archlinux.org/index.php/Zsh#The_.22command_not_found.22_hook

msquared commented on 2013-10-06 14:53

Actually /etc/profile itself sources /etc/profile.d/*.sh and bash itself sources /etc/profile ... seems something else is broken on your system or you changed this default behavior somehow.

danyf90 commented on 2013-10-06 14:06

i've solved the issue by adding the following line to my .bashrc file:
source /etc/profile.d/cnf.sh

danyf90 commented on 2013-09-12 19:02

EDIT:
it works in virtual console (ctrl+alt+f1) but it doesn't in Konsole or yakuake (i'm using kde)

danyf90 commented on 2013-09-10 11:05

it doesn't work for me.
cnf-lookup works properly but when i write a not recognized command i receive a simple command not found error message.

Det commented on 2013-04-16 22:34

For proper English the output could say "The command 'X' is provided by [...]" instead of "The command 'X' is been provided by [...]".

Also to make it work in subshells too you could use ${ZSH_NAME} and ${BASH} instead of ${SHELL} in '/etc/profile.d/cnf.sh' (see: http://stackoverflow.com/a/3327022).

EasySly commented on 2013-03-10 11:08

If you faced with error:
cnf-lookup: error while loading shared libraries: libarchive.so.12: cannot open shared object file: No such file or directory

Solution the same reinstall comman-not-found package

msx commented on 2013-02-01 00:36

@EasySly: that solved my issue, thanks for posting!

EasySly commented on 2013-01-31 11:27

If you have such error after last upgarde of boost-lib:
nf-lookup: error while loading shared libraries: libboost_system.so.1.50.0: cannot open shared object file: No such file or directory

Please reinstall command-not-found package. It will resolve such error.

msquared commented on 2012-09-28 11:14

cnf-sync is a shell script that accesses the catalog files from my mirror via curl and wget.
as creating the catalogs is a bit costly at the moment I host them. this mechanism will change soon.
passing firewalls is only possible if .wgetrc and .curlrc are aware of that.

nevertheless you can edit cnf-sync to let curl give you a more meaningful error message.

dlin commented on 2012-09-28 00:46

What's the behavior of downloading catalog?
Is it can pass through firewall?

loading packages...
resolving dependencies...
looking for inter-conflicts...

Targets (1): command-not-found-0.4.4-1

Total Installed Size: 0.27 MiB
Net Upgrade Size: 0.00 MiB
upgrade failed.

Proceed with installation? [Y/n]
(1/1) checking package integrity [######################] 100%
(1/1) loading package files [######################] 100%
(1/1) checking for file conflicts [######################] 100%
(1/1) checking available disk space [######################] 100%
(1/1) upgrading command-not-found [######################] 100%
Could not download catalog file ... aborting
error: command failed to execute correctly

I've tried
sudo cnf-sync
Could not download catalog file ... aborting

Anonymous comment on 2012-09-26 12:03

Looks like cnf-sync only needs wget.

I got some warning when installing.

After install wget,

$ sudo cnf-sync

for sync database

msquared commented on 2012-05-13 21:20

Never thought that anyone would use dash as a logon shell :-)

Nevertheless I have two solutions:

1)
conflicts=('dash')

:-)

2)
mv /etc/profile.d/cnf.sh /usr/local/etc/profile.d/cnf.sh
and put some similar coding into /etc/profile.d/cnf.sh that just sources the other one for zsh or bash exclusively

Not sure whether dash has a command_not_found_handle at all ...

Patches welcome :-)

Freso commented on 2012-05-13 13:30

I love this script when I use it with zsh. It's really great. :)

However, when using dash as the login shell, I get the following error:
-dash: 3: /etc/profile.d/cnf.sh: Syntax error: "(" unexpected (expecting ";;")

I looked over the script, but couldn't think of a way off-hand to eliminate this error. :/

msquared commented on 2012-04-10 19:30

fixed ... thanks!

dlin commented on 2012-04-10 14:45

can not build

/tmp/yaourt-tmp-dlin/aur-command-not-found/src/command-not-found/src/guard.cpp: In function ‘void cnf::print_trace(int)’:
/tmp/yaourt-tmp-dlin/aur-command-not-found/src/command-not-found/src/guard.cpp:53:35: error: ‘getpid’ was not declared in this scope
/tmp/yaourt-tmp-dlin/aur-command-not-found/src/command-not-found/src/guard.cpp:55:54: error: ‘readlink’ was not declared in this scope
/tmp/yaourt-tmp-dlin/aur-command-not-found/src/command-not-found/src/guard.cpp:56:26: error: ‘fork’ was not declared in this scope
/tmp/yaourt-tmp-dlin/aur-command-not-found/src/command-not-found/src/guard.cpp:58:18: error: ‘dup2’ was not declared in this scope
/tmp/yaourt-tmp-dlin/aur-command-not-found/src/command-not-found/src/guard.cpp:61:39: error: ‘execlp’ was not declared in this scope
make[2]: *** [CMakeFiles/cnf.dir/guard.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/cnf.dir/all] Error 2
make: *** [all] Error 2

msquared commented on 2011-12-10 18:57

- Next version will clone via https.

- For the chroot thing: At the moment I do not have such a chroot available. Could you imagine a mechanism to reliable detect the 32bit chroot situation?

dlin commented on 2011-12-07 04:40

I try to build this on arch32-light, but get the following result.
How could I change it?

Or, could you change the script to detect if this is under chroot 32 or not?

Loading catalog community-staging-x86_64.tdb ...
Loading catalog kde-unstable-x86_64.tdb ...
Loading catalog multilib-testing-x86_64.tdb ...
Loading catalog core-x86_64.tdb ...
Loading catalog multilib-x86_64.tdb ...
Loading catalog gnome-unstable-x86_64.tdb ...
Loading catalog testing-x86_64.tdb ...
Loading catalog staging-x86_64.tdb ...
Loading catalog community-x86_64.tdb ...
Loading catalog extra-x86_64.tdb ...
Loading catalog community-testing-x86_64.tdb ..

dlin commented on 2011-12-07 04:37

Could you change git to https? It let firewall happier

karol_007 commented on 2011-09-11 17:32

Works for me now:
[karol@black ~]$ abiword
The command 'abiword' is been provided by the following packages:
[extra-i686]
abiword (2.8.6-5) [ abiword ]

msquared commented on 2011-09-11 17:28

I switched the backend implementation to tdb. It should work now on i686 and x86_64.

karol_007 commented on 2011-09-11 00:05

I'm using 32-bits.

msquared commented on 2011-09-11 00:05

Hi,

I wrote this just for fun ... and actually it works fine on my box.
I discovered that there is already pkgfile that has this functionality right an hour before finishing this one.
So, no matter ...

If you can help me finding this issue than thanks a lot.

What architectures do you use? I guess its a 32bit problem.

Matthias

msquared commented on 2011-09-11 00:00

Hi,

I wrote this just for fun ... and actually it works fine on my box.
I discovered that there is already pkgfile that has this functionality right an hour before finishing this one.
So, no matter ...

If you can help me finding this issue than thanks a lot.

Matthias

karol_007 commented on 2011-09-10 23:58

@Sara
Yes, it provides the same functionality.

karol_007 commented on 2011-09-10 23:57

[karol@black ~]$ cnf-lookup abiword
gdbm fatal: lseek error

Sara commented on 2011-09-10 23:57

Does this program duplicate the functionality provided by pkgfile (part of the
pkgtools package)?

From the pkgtools install file:

pkgfile includes a "command not found" hook for both zsh and bash. This will
automatically run pkgfile whenever you run a command which the shell cannot
find.

msquared commented on 2011-09-10 23:53

Hi,

the right result should be like this:

metti@beebaer % abiword
The command 'abiword' is been provided by the following packages:
[extra-x86_64]
abiword (2.8.6-5) [ abiword ]
zsh: command not found: abiword

I as well checked in bash ... hmmm

Can you please try the command:
$ cnf-lookup abiword

That directly queries the database.
If this delivers the same error, than somehow the database has not been downloaded correctly.
To download the database again, execute as root
# cnf-sync

Anonymous comment on 2011-09-10 23:52

I get the same output karol does. Before trying to run abiword I did

. /etc/profile.d/cnf.sh

Should be enough right?

msquared commented on 2011-09-10 23:46

metti@beebaer % abiword
The command 'abiword' is been provided by the following packages:
[extra-x86_64]
abiword (2.8.6-5) [ abiword ]
zsh: command not found: abiword

I as well checked in bash ... hmmm

karol_007 commented on 2011-09-10 23:42

Is it working for you?

[karol@black ~]$ abiword
gdbm fatal: lseek error
bash: abiword: command not found

Anonymous comment on 2011-09-10 23:39

Well ... I guess, if you run e.g. luakit, but the package isn't installed on your system, this package tells you, that the package community/luakit contains this executable.

msquared commented on 2011-09-10 23:36

I already updated the package ... the first one was just automatically generated ... sorry.

karol_007 commented on 2011-09-10 22:58

That's a great & detailed package description - not.
What does it do?