You are not logged in.
Here is a problem I had for quite some time that I just addressed and solved, but I wonder why the solution works.
When I run, for instance,
$ sudo pacman -S uglify-js wireshark-cliI used to get:
[Normal output]
:: Processing package changes...
(1/2) reinstalling uglify-js [###############################] 100%
(2/2) reinstalling wireshark-cli [###############################] 100%
Failed to set capabilities on file 'usr/bin/dumpcap': No such file or directory
error: command failed to execute correctly
[Normal output (hooks)]Whereas if I first
su -lthen
# pacman -S uglify-js wireshark-clithe blank lines after uglify-js and the non-critical failure after wireshark-cli would not appear, it seemed everything was fine.
I figured it had to do with environment variables so I tested
sudo -E pacman -S …, with success. I issued
sudo envand
# envto compare and I added one by one the differing environment variables to sudoers in
Defaults env_keep += ….
Finally
sudo pacman -S …was working fine with only SHLVL added to the env_keep field.
I do not understand why that works, and why I had the problem in the first place since a web search for this issue returned nothing directly related. Any ideas?
Offline