Arch Linux WSL AUR

Arch Linux WSL AUR

如何让 AUR 构建在 WSL 中运行。

本质上我总是得到权限被拒绝(操作系统错误 13),因为我没有以 root 身份运行

但您不能以 root 用户身份使用 AUR,因此请注意 22。

显示为根和本地的示例事务

    [root@DannysLaptop ~]# paru -S system-monitoring-center
:: Resolving dependencies...
error: can't install AUR package as root
[root@DannysLaptop ~]# su danny
[danny@DannysLaptop root]$ paru -S system-monitoring-center
:: Resolving dependencies...
:: Calculating conflicts...
:: Calculating inner conflicts...

Repo (8) dmidecode-3.3-1  startup-notification-0.12-7  libxres-1.2.1-1  libwnck3-40.0-1  mesa-utils-8.4.0-7  python-cairo-1.20.1-3  freeglut-3.2.2-1  python-opengl-3.1.5-6
Aur (1) system-monitoring-center-1.2.1-1

:: Proceed to review? [Y/n]: 

:: Downloading PKGBUILDs...
 PKGBUILDs up to date
 nothing new to review
error: failed to run: sudo pacman --sync -- extra/dmidecode extra/startup-notification extra/libxres extra/libwnck3 extra/mesa-utils extra/python-cairo extra/freeglut extra/python-opengl: Permission denied (os error 13)
[danny@DannysLaptop root]$ 

答案1

您看到的错误似乎与 Rust 的某种权限问题有关。看这个 Github 问题以获得一些可能的见解。请注意,paru在尝试复制您的问题时,我自己能够在 WSL2 下的 Arch 上安装和运行,没有任何问题。

您的 WSL2/Arch 主目录中有什么异常吗?/home/danny/.cargo例如,如果在 Windows 驱动器上,我可以看到这种情况可能发生。/home/danny/.cargo或者/home/danny/.rustuproot中是否存在任何文件或目录?

答案2

感谢 NotTheDr01ds 指出这是一个基于 Rust 的错误。切换到yay(基于 Go 而不是 Rust)已经为我解决了这个问题并且工作得很好。

相关内容