You are not logged in.

#1 2021-11-27 22:14:43

shadowfok
Member
Registered: 2021-11-27
Posts: 6

[SOLVED] makepkg says i use root but i use my personal user account

Hello everyone I am new to arch Linux and Linux in general.
I wanted to install yay but I got an error message that I was logged in as root and that that could cause damage to my system how do I solve this.

[shadow@archlinux yay-git]$ sudo makepkg -si
==> ERROR: Running makepkg as root is not allowed as it can cause permanent,
catastrophic damage to your system.

Last edited by shadowfok (2021-11-27 23:02:45)

Offline

#2 2021-11-27 22:18:00

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

Re: [SOLVED] makepkg says i use root but i use my personal user account

sudo is root...

Offline

#3 2021-11-27 22:19:40

shadowfok
Member
Registered: 2021-11-27
Posts: 6

Re: [SOLVED] makepkg says i use root but i use my personal user account

but if I use it without sudo it says this.
[shadow@archlinux yay-git]$ makepkg -si
==> ERROR: You do not have write permission for the directory $BUILDDIR (/home/shadow/yay-git).
    Aborting...

Offline

#4 2021-11-27 22:23:45

loqs
Member
Registered: 2014-03-06
Posts: 17,324

Re: [SOLVED] makepkg says i use root but i use my personal user account

You created the directory yay-git using sudo as well?

Online

#5 2021-11-27 22:26:30

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,774

Re: [SOLVED] makepkg says i use root but i use my personal user account

Probably because you have run it as root in the past and there is a directory or file in that path you don't have permission to read.   What is the output of ls -l /home/shadow/yay-git   ?

As an aside, is there any way I can mentor you and convince you not to install an AUR helper just yet?   Learn to use the tools and do it the right way rather than use yay?  It is kind of like trying to use a chainsaw as a crutch.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#6 2021-11-27 22:29:18

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] makepkg says i use root but i use my personal user account

shadowfok wrote:

but if I use it without sudo it says this.
[shadow@archlinux yay-git]$ makepkg -si
==> ERROR: You do not have write permission for the directory $BUILDDIR (/home/shadow/yay-git).
    Aborting...

Most likely because you've also used sudo in the past when you shouldn't have.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#7 2021-11-27 22:31:21

shadowfok
Member
Registered: 2021-11-27
Posts: 6

Re: [SOLVED] makepkg says i use root but i use my personal user account

Oh i did not know I could use AUR without a helper.
If you could help me to use AUR without a helper i would really appreciate it! big_smile

Offline

#8 2021-11-27 22:32:08

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] makepkg says i use root but i use my personal user account


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#9 2021-11-27 22:32:15

loqs
Member
Registered: 2014-03-06
Posts: 17,324

Re: [SOLVED] makepkg says i use root but i use my personal user account

Have you read Arch_User_Repository#Getting_started?
Edit:
You probably also want to remove or change the ownership of anything in your users home directory not owned by that user

find ~ \! -uid `id -u` -o \! -gid `id -g`

Last edited by loqs (2021-11-27 22:41:06)

Online

#10 2021-11-27 22:56:28

shadowfok
Member
Registered: 2021-11-27
Posts: 6

Re: [SOLVED] makepkg says i use root but i use my personal user account

Thank you!!!
I looked at the AUR wiki and it worked.

Offline

#11 2022-09-15 04:59:31

nibazshab
Member
Registered: 2022-08-25
Posts: 53

Re: [SOLVED] makepkg says i use root but i use my personal user account

ewaller wrote:

Probably because you have run it as root in the past and there is a directory or file in that path you don't have permission to read.   What is the output of ls -l /home/shadow/yay-git   ?

As an aside, is there any way I can mentor you and convince you not to install an AUR helper just yet?   Learn to use the tools and do it the right way rather than use yay?  It is kind of like trying to use a chainsaw as a crutch.

Can you tell me why not to use the aur assistant ? I don't understand these

Offline

#12 2022-09-15 07:47:45

seth
Member
Registered: 2012-09-03
Posts: 51,048

Re: [SOLVED] makepkg says i use root but i use my personal user account

Please don't necro-jack threads. Your question has nothing to do w/ the subject of this old and solved thread.

ewaller wrote:

is there any way I can mentor you and convince you not to install an AUR helper just yet?

See the warning at https://wiki.archlinux.org/title/AUR_helpers - at some point you'll run into trouble because the helper screws up (the more they abstract, the more likely) and you're supposed to be able to deal with that.
AUR helpers are ok for convenience, not as an excuse to not understand the nature and process of the AUR.
And it gets really bad when they blend the vetted repo packages and random junk on the AUR and actively discourage you from paying attention to what you're installaing there.

Online

#13 2022-09-15 12:03:00

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: [SOLVED] makepkg says i use root but i use my personal user account

Offline

Board footer

Powered by FluxBB