You are not logged in.

#1 2014-09-17 01:59:21

arnuld
Member
From: INDIA
Registered: 2005-12-19
Posts: 220
Website

makepkg gives error as ROOT but asks for sudo

This is kind of strange behavior. "makepkg -i" gives error when run as root but when run as normas user it asks for superusel permissions using sudo. I do not understand as per [1]:

If you run as root, makepkg can put files anywhere on your system rather than just in $pkgdir where that package is made from.  This is stopped by using fakeroot, which is disabled when run as root.

When it is asking for sudo then I am giving superuser authority anyway:


[root@arch64 pan]# makepkg -i
==> ERROR: Running makepkg as root is a BAD idea and can cause permanent,
catastrophic damage to your system. If you wish to run as root, please
use the --asroot option.

arnuld@arch64 pan]$ makepkg -i
==> WARNING: A package has already been built, installing existing package...
==> Installing package pan with pacman -U...

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

[sudo] password for arnuld: 

==> ERROR: Aborted by user! Exiting...

[1] https://bbs.archlinux.org/viewtopic.php?id=67561

Offline

#2 2014-09-17 02:03:29

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,459
Website

Re: makepkg gives error as ROOT but asks for sudo

It will not ask for a password without the "-i" flag.  Read the output:

Installing package pan with pacman -U

"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2014-09-17 02:05:36

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,672
Website

Re: makepkg gives error as ROOT but asks for sudo

Using sudo means that root privileges are only used in the install phase and not the build phase.

Offline

Board footer

Powered by FluxBB