Sample Header Ad - 728x90

How to install sudo on Alpine 3.17 VM?

4 votes
1 answer
17960 views
I have installed Alpine r3.17 on a VM under KVM. I want to install sudo tool. # su - # apk update ... OKL 4994 distinct packages available # apk add sudo ERROR: unable to select packages: sudo (no such package): required by: world[sudo] After checking the Alpine website, I see sudo is a valid package: * [Alpine packages -sudo](https://pkgs.alpinelinux.org/package/v3.17/community/x86_64/sudo) Valid for release 3.17. I've seen similar questions on the web for r3.16 as well, so I don't think this is a new problem. And yes for a virtul machine, not a container, I do want sudo on key machines. Yet apk does not find it. Everywhere I have looked so far show an install command like: # apk add sudo For example: * [Post Installation Recommendations](https://docs.alpinelinux.org/user-handbook/0.1a/Working/post-install.html) , [Alpine user handbook](https://docs.alpinelinux.org/user-handbook) * [Add, Delete And Grant Sudo Privileges To Users In Alpine Linux](https://ostechnix.com/add-delete-and-grant-sudo-privileges-to-users-in-alpine-linux/) * [QEMU](https://wiki.alpinelinux.org/wiki/QEMU) , [Alpine Linux wiki](https://wiki.alpinelinux.org/wiki) * Shows sudo usage, but not how it was installed. I wondered if '*world*' is relevant, as in: "required by: world[sudo]"? Do I need to explicitly reference another repository. According to the package docs sudo is in "community". Additionally, the package: spice-vdagent is not found for installation, but I was able to install spice-0.15.1. The problem is not unique to the sudo utility. Any useful advice is welcome. Thank you in advance.
Asked by will (548 rep)
Apr 21, 2023, 01:30 AM
Last activity: May 26, 2023, 12:29 AM