You are not logged in.

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

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

[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,126
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: 5

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: 14,478

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

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

Offline

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

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 18,098

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
Forum Moderator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 4,879

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: 5

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
Forum Moderator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 4,879

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: 14,478

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)

Offline

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

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

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

Board footer

Powered by FluxBB