我无法安装 Yaourt:我没有该目录的写权限

我无法安装 Yaourt:我没有该目录的写权限

这些是说明(https://manjaro.site/how-to-install-yaourt-on-arch-linux/) 安装 Yaourt:

git clone https://aur.archlinux.org/package-query.git 
cd package-query 
makepkg -si 
cd .. 
git clone https://aur.archlinux.org/yaourt.git 
cd yaourt 
makepkg -si

我成功运行了前两行,但运行时makepkg出现错误:

=> ERROR: You do not have write permission for the directory $BUILDDIR (/home/pietrom/package-query).
    Aborting...

我尝试:

sudo makepkg -si

我收到此错误:

==> ERROR: Running makepkg as root is not allowed as it can cause permanent, 
catastrophic damage to your system.

我更改文件的所有者:

sudo chown pietrom ./PKGBUILD
sudo chgrp users ./PKGBUILD

我再次得到:

makepkg -si
==> ERROR: You do not have write permission for the directory $BUILDDIR (/home/pietrom/package-query).
Aborting...

我究竟做错了什么?

我必须安装 Yaourt 才能安装 Google Chrome。

答案1

确保您没有sudo在前面输入,如下所示:

sudo git clone https://aur.archlinux.org/yaourt.git

相反,输入:

git clone https://aur.archlinux.org/yaourt.git

相关内容