OPAM installation error

I am trying to install OPAM to start learning OCaml. I used sudo apt install opam to install the package. The version installed was not up to date, so I tried the command opam update, which did not work. Then I downloaded and installed the latest binary distribution. Now the command opam update is working, but then I am not able to create an opam switch. I get the error that I have attached in the screenshot. Can anyone please help me rectify this error?

Vinod.

Looks similar to opam broken on ubuntu 24.04 (`bwrap: operation not permitted`) · Issue #5968 · ocaml/opam · GitHub. Maybe the fixes there will help you.

Cheers,
Nicolas

1 Like

Thanks! It worked! Thanks for the link.