[Linux] Error when trying to install package using 'sudo pkgm install'
Author: tclementdevCreated Dec 2, 2025Updated Jan 17, 2026
On Fedora Silverblue, I installed pkgx:
> curl https://pkgx.sh | sh
> ls /usr/local/bin
mash pkgm pkgxThen tried to install a package inside /usr/local/bin using pkgm:
> sudo pkgm install fish
sudo: unable to execute /root/.pkgx/pkgx.sh/v2.7.0/bin/pkgx: Permission deniedIt seems like it is trying to install things in the context of the root user, rather than installing things in /usr/local/bin.
Not using sudo works:
> pkgm install fish
> which fish
~/.local/bin/fishBased on the documentation, I expected sudo pkgm install fish to properly install the package in /usr/local/bin. Am I missing something here?
Source: pkgxdev/pkgx