ERROR: unable to select packages error on Alpine Linux

In my first Alpine Linux post I had mentioned why I began using Alpine Linux. Container technologies was the reason for me to use this distro. I have enough experience about vm virtualization, but have no experience about application virtualization. Anyway, let’s return the main topic.

Installing a new package seems easy, somehow I couldn’t install it. I updated the OS, and tried to install the docker package, but no luck. By the way to install docker on your Alpine Linux is used the given command.

apk add docker

Once I typed the above code I got the following error.

ERROR: unable to select packages:
docker (no such package):
required by: world[docker]

I googled it, and couldn’t find any solution. Lucilly I found the solution easily due to previous Linux experiences. I visited the packages menu on official alpine linux website and search the docker, and saw that docker is contained on the community repository, then checked my repository on Alpine Linux.

Ref : Alpine Linux packages https://pkgs.alpinelinux.org/packages

You can also check yours with the following command.

tail -f /etc/apk/repositories

As you see I only use the main repository and docker is not available on this repository. You have to modify this file and remove # at the beginning of the community link, then run the update command.

Removing the # character of the beginning of the community link solved my problem, but you can also remove the others. It helps you not to get ERROR: unable to select packages error while installing a package. Mine was just an example. Don’t forget to check it out what was written on Linux category on my website.

Thanks for your time reading.

Regars,

Hasan

Published by Hasan Altin

I don't see any difference between the one who doesn't share its knowledge or the one who doesn't share its bread.

Leave a Reply

Your email address will not be published.