8

When I run this command :

apt install libkf5*

I get the following error :

Unable to locate package libkf5*


I'm sure that the packages whose names start with libkf5 exist (tab-completion says so) . So the problem is not about the absence of those packages.(Note the asterisk at the end of that error message , the wildcard's not working at all)
I use apt v.1.9.
Thanks in advance.

  • 1
    That can be a very dangerous way to locate a package. If you are not careful, you might install something you didn't expect. – user535733 Mar 20 at 18:30
  • I'm confused. What does this have to do with bash expansion? Or even bash at all? – Jörg W Mittag Mar 21 at 10:49
10

Recent versions of apt changed the way patterns are specified, and apt no longer supports regular expressions or wildcards.

You should now use

apt install '~nlibkf5.*'

with apt 1.9.9 or later, or the long form

apt install '?name(libkf5.*)'

available slightly earlier.

See the apt-patterns manpage (man apt-patterns) for details.

| improve this answer | |
1

One can still use plain apt-get for such purpose.

For the OP's example it will look like

sudo apt-get install libkf5*

| improve this answer | |
  • 1
    Thanks N0rbert. Apt-get should be backward-compatible (but not apt ) as stated here, so it should work. – Parsa Mousavi May 28 at 18:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.