1

Trying to search with opkg command in my Onion Omega system:

opkg search vim 
opkg search v*

Got nothing in output in all cases. What I do wrong?

1
  • Do you want to search for a package to install? Jan 10, 2021 at 14:21

2 Answers 2

1

The opkg search command wrongly states it expects a regexp (regular expression). It actually expects a glob (shell wildcard pattern). Furthermore, the pattern must match the entire path, and it only searches the database of installed packages.

So on one of my QNAPs,

opkg search /opt/bin/find    # "findutils - 4.7.0-1"
opkg search find             # no match
opkg search '*/find'         # "findutils - 4.7.0-1"

But

opkg search '*/ls'           # no match, because coreutils-ls is not installed

If you want to find which package provides a file, there is no easy way to do this. You can search for package names,

opkg list | grep vi
opkg list | awk '$1 ~ /\<vi/'

or hunt through visually,

opkg list | sort | cut -c1-80 | less
0

To search for available package use:

opkg list | grep package

or

opkg list *package*

search usage in opkg:

opkg search file    

To list the package providing file.

opkg manpages:

   search <file|regexp>    List package providing <file>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .