On a newish computer with F25, I see this at the command line when I type in a command that's not installed:
[matt@envious ~]$ pv bash: pv: command not found...
and then it just sits there until I ctrl-c or similar. I assume what's happening is it's trying to check for what package provides that command, but failing.
Has anyone else seen this? What can I do about it?
Apologies if this is a common error--it's resistant at least to the search terms I can think of.
Thanks, Matt
On Wed, 14 Jun 2017 12:52:09 -0400 Matt Morgan wrote:
Has anyone else seen this? What can I do about it?
The very first time I saw that I spent hours tracking down the "PackageKit-command-not-found" package and taking great pleasure in running the command:
dnf erase PackageKit-command-not-found
(Actually, when it first happened the command I probably ran was "yum erase PackageKit-command-not-found" :-).
Just FYI, bash-completion is almost as irritating for somewhat similar reasons, you might want to check it out and see if you want to remove it as well.
On 06/14/2017 09:52 AM, Matt Morgan wrote:
On a newish computer with F25, I see this at the command line when I type in a command that's not installed:
[matt@envious ~]$ pv bash: pv: command not found...
and then it just sits there until I ctrl-c or similar. I assume what's happening is it's trying to check for what package provides that command, but failing.
Has anyone else seen this? What can I do about it?
Apologies if this is a common error--it's resistant at least to the search terms I can think of.
Yes, it can be VERY annoying--especially if you have a lot of RPMs installed and RPM searches are slow.
That bash functionality is part of an RPM called
PackageKit-command-not-found
When installed, it inserts a file, "/etc/profile.d/PackageKit.sh", that login shells include when they read /etc/profile on startup. You can
sudo dnf remove PackageKit-command-not-found
if you want to get rid of that, uhm, "functionality" (or simply delete "/etc/profile.d/PackageKit.sh" or move it to some directory other than /etc/profile.d). ---------------------------------------------------------------------- - Rick Stevens, Systems Engineer, AllDigital ricks@alldigital.com - - AIM/Skype: therps2 ICQ: 226437340 Yahoo: origrps2 - - - - Always remember you're unique, just like everyone else. - ----------------------------------------------------------------------
On 14Jun2017 12:52, Matt Morgan minxmertzmomo@gmail.com wrote:
On a newish computer with F25, I see this at the command line when I type in a command that's not installed:
[matt@envious ~]$ pv bash: pv: command not found...
and then it just sits there until I ctrl-c or similar. I assume what's happening is it's trying to check for what package provides that command, but failing.
Has anyone else seen this? What can I do about it?
Apologies if this is a common error--it's resistant at least to the search terms I can think of.
You can sometimes see external stuff by running this:
(set -x; pv )
If this is entire bash-internal then it won't help, and if it happens in bash's prompt logic it won't help, but this might:
set -x; pv
Sounds like others have named the offending thing; this is just debugging help.
Cheers, Cameron Simpson cs@zip.com.au
On Wed, Jun 14, 2017 at 5:54 PM, Cameron Simpson cs@zip.com.au wrote:
On 14Jun2017 12:52, Matt Morgan minxmertzmomo@gmail.com wrote:
On a newish computer with F25, I see this at the command line when I type in a command that's not installed:
[matt@envious ~]$ pv bash: pv: command not found...
and then it just sits there until I ctrl-c or similar. I assume what's happening is it's trying to check for what package provides that command, but failing.
Has anyone else seen this? What can I do about it?
Apologies if this is a common error--it's resistant at least to the search terms I can think of.
You can sometimes see external stuff by running this:
(set -x; pv )
If this is entire bash-internal then it won't help, and if it happens in bash's prompt logic it won't help, but this might:
set -x; pv
Sounds like others have named the offending thing; this is just debugging help.
Cheers, Cameron Simpson cs@zip.com.au
Thanks, everyone. Interesting that nobody had a fix for the (humorously named) PackageKit-command-not-found issue, i.e., all respondents were just happy trashing it. I work on new computers a lot and don't always keep track of what packages I install, so (although I agree it's weird and not a very unixy/linuxy way to do things) I actually wouldn't mind if it ever worked again! In the meantime, I have also trashed it.
Best, Matt
On 06/15/2017 12:28 PM, Matt Morgan wrote:
On Wed, Jun 14, 2017 at 5:54 PM, Cameron Simpson <cs@zip.com.au mailto:cs@zip.com.au> wrote:
On 14Jun2017 12:52, Matt Morgan <minxmertzmomo@gmail.com <mailto:minxmertzmomo@gmail.com>> wrote: On a newish computer with F25, I see this at the command line when I type in a command that's not installed: [matt@envious ~]$ pv bash: pv: command not found... and then it just sits there until I ctrl-c or similar. I assume what's happening is it's trying to check for what package provides that command, but failing. Has anyone else seen this? What can I do about it? Apologies if this is a common error--it's resistant at least to the search terms I can think of. You can sometimes see external stuff by running this: (set -x; pv ) If this is entire bash-internal then it won't help, and if it happens in bash's prompt logic it won't help, but this might: set -x; pv Sounds like others have named the offending thing; this is just debugging help. Cheers, Cameron Simpson <cs@zip.com.au <mailto:cs@zip.com.au>>Thanks, everyone. Interesting that nobody had a fix for the (humorously named) PackageKit-command-not-found issue, i.e., all respondents were just happy trashing it. I work on new computers a lot and don't always keep track of what packages I install, so (although I agree it's weird and not a very unixy/linuxy way to do things) I actually wouldn't mind if it ever worked again! In the meantime, I have also trashed it.
I believe it was explained fairly clearly. There is no "fix" unless you want to dig through the PackageKit environment to make it keep its caches up-to-date and change its cache expiration times (ugh!) or disable the beast by either removing the PackageKit-command-not-found RPM or deleting the /etc/profile.d/Packagekit.sh file (or moving it out of that directory) so your shell doesn't load it when it starts up.
Personally, I think getting a "command not found" error is more than adequate to indicate the command you chose is not installed or mistyped. If you need to install the command, you can do a simple
dnf provides "*/command-you-typed" (DNF) pkcon what-provides "command-you-typed" (PackageKit)
and it'll tell you what RPM needs to installed to provide the command you want. Essentially, this "feature" is supposed to do the above pkcon query automatically when you get a "not found" error. However, unless you have PackageKit keep its database up-do-date (via PackageKit-cron or some other method), the pkcon query forces an update to its databases before it can answer the question and THAT'S what sucks up all the time. I just ran it and it took over three minutes to do the query, whereas the dnf query took less than five seconds. Granted, I run dnf once a day to see what updates are out there, but still...
Now, should you wish to rewrite the "/usr/libexec/pk-command-not-found" program (which is what eventually gets invoked on "command not found" errors by the script above) or do major surgery to the PackageKit universe, I'm sure we'd all look forward to reinstating this (marginally useful) utility/feature. As it stands now, it's pretty useless.
That's just my opinion. ---------------------------------------------------------------------- - Rick Stevens, Systems Engineer, AllDigital ricks@alldigital.com - - AIM/Skype: therps2 ICQ: 226437340 Yahoo: origrps2 - - - - To err is human. To forgive, a large sum of money is needed. - ----------------------------------------------------------------------