Pamac install vs sudo pamac install

Hi,

I’m wondering what’s different between the commands “pamac install ” and “sudo pamac install ”. If I do “sudo pamac install google-cloud-sdk”, I got the following error, but it’s fine without sudo instead using GUI to input password. This also happened before for spotify or some other packages.

googlecloudsdk.core.configurations.named_configs.NamedConfigFileAccessError: Active configuration name could not be read from: [/root/.config/gcloud/active_config]. Ensure you have sufficient read permissions on required active configuration in [/root/.config/gcloud/configurations].
  Unable to read file [/root/.config/gcloud/active_config]: [Errno 13] Permission denied: '/root/.config/gcloud/active_config'

It is always recommended to use pamac without sudo, as it will ask for password using polkit when elevated rights are needed.
If you run pamac with sudo, you might run an AUR script unverified, which is competent of doing harmful things to your system, in the worst case scenario, that’s probably why it’s discouraged.

2 Likes

I’ll have to search but I think something has changed about that not so long ago.

//EDIT: didn’t find what I was talking about, but there is this issue `google-cloud-sdk` AUR package gets built incorrectly, ends up using `/root` for configuration files but cannot access. (Works with manual `makepkg`.) (#1248) · Issues · Applications / pamac · GitLab

google-cloud-sdk is an AUR package. The optimal command to install with pamac is

pamac build google-cloud-sdk

But install is aliased to build with a warning

$ pamac install google-cloud-sdk
Warning: google-cloud-sdk is only available from AUR
Preparing...
Checking google-cloud-sdk dependencies...
Resolving dependencies...
Checking inter-conflicts...

To build (1):
  google-cloud-sdk  394.0.0-1    AUR

Manjaro Wiki used to have a comment about never using sudo
But sudo pamac is only a problem when building AUR packages

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.