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??
 


Make another user, log in with this user and make the package.
 
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?
 
useradd -m test
su test
Command you want to run
exit
userdel test
 
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.
 

Members online


Top