Alpine Linux – How to Search for a File in APK Packages

alpine-linuxapk-toolspackage-management

I would like to know, given a binary's name, which package I should install on Alpine Linux.

How can I do that?

Best Answer

You have three ways basically.

First: The package should be installed and you need to specify the full path :

apk info --who-owns /path/to/the/file

Second: Use the pkgs.alpinelinux.org website

Third: Use the api.alpinelinux.org API by filtering the json output. For this you need a json parser like jq:

apk add jq

then use the API with the instructions provided here

.: Francesco

Related Question