在尝试init
AOSP存储库时遇到的错误让我有些困惑(以前我曾经能够使用repo工具进行初始化):
aosp@aosp:~/WDIR$ repo init -u https://github.com/khadas/android_manifest.git -b khadas-edge-Qt
warning: gpg (GnuPG) is not available.
warning: Installing it is strongly encouraged.
warning: templates not found /build/git-repo-publish/parts/git/install/usr/share/git-core/templates
Get https://gerrit.googlesource.com/git-repo/clone.bundle
Get https://gerrit.googlesource.com/git-repo
remote: Finding sources: 100% (7/7)
remote: Total 7 (delta 0), reused 7 (delta 0)
Unpacking objects: 100% (7/7), done.
From https://gerrit.googlesource.com/git-repo
89f3ae5..65f51ad master -> origin/master
Traceback (most recent call last):
File "/home/aosp/WDIR/.repo/repo/main.py", line 49, in <module>
import event_log
File "/home/aosp/WDIR/.repo/repo/event_log.py", line 167, in <module>
_EVENT_ID = multiprocessing.Value('i', 1)
File "/snap/git-repo/18/usr/lib/python2.7/multiprocessing/__init__.py", line 253, in Value
return Value(typecode_or_type, *args, **kwds)
File "/snap/git-repo/18/usr/lib/python2.7/multiprocessing/sharedctypes.py", line 108, in Value
lock = RLock()
File "/snap/git-repo/18/usr/lib/python2.7/multiprocessing/__init__.py", line 183, in RLock
return RLock()
File "/snap/git-repo/18/usr/lib/python2.7/multiprocessing/synchronize.py", line 172, in __init__
SemLock.__init__(self, RECURSIVE_MUTEX, 1, 1)
File "/snap/git-repo/18/usr/lib/python2.7/multiprocessing/synchronize.py", line 75, in __init__
sl = self._semlock = _multiprocessing.SemLock(kind, value, maxvalue)
OSError: [Errno 13] Permission denied
aosp@aosp:~/WDIR$
我尝试重新安装repo实用程序,但没有帮助。有小费吗? 我正在使用已安装所有更新的Ubuntu 20.04。在过去的几天里,该系统一直运行良好,并且我已经成功地在其上构建了其他映像。今天早上我能够将此存储库克隆到同一台计算机上的另一个驱动器。
我进行回购初始化的文件夹的权限如下:
PS:我也尝试使用sudo
特权,但一无所获。出现同样的问题。
预先感谢您的帮助。
编辑:我已经尝试过全新安装的Ubuntu Server 20.04 LTS。仍然看到相同的问题。
答案 0 :(得分:5)
找到了答案。 snapcraft商店中的版本存在问题(更多详细信息:https://bugs.launchpad.net/snapstore-server/+bug/1882296)。
@ Wilson-q提到“解决方法是删除snap git-repo软件包,然后直接从google源站点安装repo。”
行得通。我希望周围有更多噪音。
答案 1 :(得分:1)
您可以手动安装。
$ mkdir -p ~/.bin
$ PATH="${HOME}/.bin:${PATH}"
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/.bin/repo
$ chmod a+rx ~/.bin/repo
答案 2 :(得分:-1)
修改文件夹权限
chmod -R 777 folder