yay not installing in Arch linux

superboy2k6

Member
Joined
Oct 23, 2019
Messages
32
Reaction score
9
Credits
0
Hello again,
After a fresh install of Arch Linux, I went ahead and made a shell program (.sh) which has these lines:

Code:
echo Installing yay in this machine
git clone https://aur.archlinux.org/yay.git
cd yay
sudo makepkg -si

But it shows an error stating like this:
Code:
ERROR: Running makepkg as root is not allowed as it can cause permanent, catastrophic damage to your system.

What is a workaround for this??
 


Peer

Well-Known Member
Joined
May 17, 2018
Messages
587
Reaction score
305
Credits
402
Make another user, log in with this user and make the package.
 
OP
superboy2k6

superboy2k6

Member
Joined
Oct 23, 2019
Messages
32
Reaction score
9
Credits
0
Hey but I'm actually creating this so that when a user has just installed Arch and when they clone my repository, the user just has to run the .sh file and nothing should go wrong.

So is it possible to create a temporary user (like say "LiveUser"), switch to that specific user, run the command and then delete "LiveUser" with shell commands?
 

Peer

Well-Known Member
Joined
May 17, 2018
Messages
587
Reaction score
305
Credits
402
useradd -m test
su test
Command you want to run
exit
userdel test
 

Peer

Well-Known Member
Joined
May 17, 2018
Messages
587
Reaction score
305
Credits
402
You may move the package files you want to build to this users home dir, so he really has the rights he needs to run makepkg.
 
MALIBAL Linux Laptops

Linux Laptops Custom Built for You
MALIBAL is an innovative computer manufacturer that produces high-performance, custom laptops for Linux.

For more info, visit: https://www.malibal.com

Members online


Top