Re: terminal hangs looking for missing commands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/15/2017 12:28 PM, Matt Morgan wrote:
> On Wed, Jun 14, 2017 at 5:54 PM, Cameron Simpson <cs@xxxxxxxxxx
> <mailto:cs@xxxxxxxxxx>> wrote:
> 
>     On 14Jun2017 12:52, Matt Morgan <minxmertzmomo@xxxxxxxxx
>     <mailto:minxmertzmomo@xxxxxxxxx>> 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@xxxxxxxxxx <mailto:cs@xxxxxxxxxx>>
> 
> 
> 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@xxxxxxxxxxxxxx -
- AIM/Skype: therps2        ICQ: 226437340           Yahoo: origrps2 -
-                                                                    -
-   To err is human.  To forgive, a large sum of money is needed.    -
----------------------------------------------------------------------
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux