提问人:Charlie Parker 提问时间:2/3/2023 更新时间:2/8/2023 访问量:531
为 opam 安装 bubblewrap 的正确方法是什么(理想情况下没有管理员权限)?
What is the proper way to install bubblewrap for opam (ideally without admin priviledges)?
问:
我收到此错误:
(iit_synthesis) brando9~ $ bash -c "sh <(curl -fsSL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)"
## Using already downloaded "/tmp/user/22003/opam-2.1.4-x86_64-linux"
## Where should it be installed ? [/lfs/ampere4/0/brando9/.local/bin] ~/.local/bin
## '~/.local/bin' resolves to '/lfs/ampere4/0/brando9/.local/bin', do you confirm [Y/n] Y
## opam 2.1.4 installed to /lfs/ampere4/0/brando9/.local/bin
## Converting the opam root format & updating
No configuration file found, using built-in defaults.
Checking for available remotes: rsync and local, git.
- you won't be able to use mercurial repositories unless you install the hg command on your system.
- you won't be able to use darcs repositories unless you install the darcs command on your system.
[WARNING] Missing dependencies -- the following commands are required for opam to operate:
- bwrap: Sandboxing tool bwrap was not found. You should install 'bubblewrap'. See https://opam.ocaml.org/doc/FAQ.html#Why-does-opam-require-bwrap.
[ERROR] Sandboxing is not working on your platform ubuntu:
"~/.opam/opam-init/hooks/sandbox.sh build sh -c echo SUCCESS >$TMPDIR/opam-sandbox-check-out && cat $TMPDIR/opam-sandbox-check-out; rm -f
$TMPDIR/opam-sandbox-check-out" exited with code 10
Do you want to disable it? Note that this will result in less secure package builds, so please ensure that you have some other isolation mechanisms in
place (such as running within a container or virtual machine). [y/N]
但它没有链接到实际安装它的方法,链接给定 https://opam.ocaml.org/doc/FAQ.html#Why-does-opam-require-bwrap 而且我认为这意味着我不需要这样做:
opam init --disable-sandboxing
opam update --all
eval $(opam env)
我错了吗?我很困惑。
答:
3赞
ivg
2/8/2023
#1
要在 Ubuntu 上安装 18.04 或更高版本,只需执行以下操作bubblewrap
sudo apt-get install bubblewrap
如果您有较旧的 Ubuntu 发行版或未打包此程序的发行版,请按照 bubblewrap 页面上的说明进行安装。
当然,您可以选择不使用 ,这实际上是消息告诉您的。只要说,是的,它就会继续,而不会包装任何东西。例如,如果要在 docker 容器中构建,则不需要 提供额外的容器化层,因此可以将其丢弃。bubblewrap
y
bubblewrap
我也认为这意味着我不需要这样做:
opam init --disable-sandboxing
...
是的,一旦你安装了二进制文件,如果你选择不使用,你需要使用这个选项初始化opam(opam安装大致包括两个步骤,首先你下载并安装二进制文件,接下来你需要运行,以便它在你的系统中配置自己)。opam
bubblewrap
opam init
评论