compile & execute Chromium failed due to SUID sandbox issue compile & execute Chromium failed due to SUID sandbox issue google-chrome google-chrome

compile & execute Chromium failed due to SUID sandbox issue


This error message...

The setuid sandbox provides API version 1, but you need 0

...implies that your setuid binary is out of date hence the program was unable to initiate/spawn a new Browsing Context i.e. Chrome Browser session.


As per the documentation in Linux SUID Sandbox Development needs a SUID helper binary to turn on the sandbox on Linux. In majority of the cases you can install the proper sandbox for you using the command:

build/update-linux-sandbox.sh

This program will install the proper sandbox for you in /usr/local/sbin and tell you to update your .bashrc if required.

However, there can be some exceptions as an example, if your setuid binary is out of date, you will get messages such as:

The setuid sandbox provides API version X, but you need YYou are using a wrong version of the setuid binary!

In these cases, you need to follow the steps below:

  • Build chrome_sandbox whenever you build chrome (ninja -C xxx chrome chrome_sandbox instead of ninja -C xxx chrome)
  • After building, execute update-linux-sandbox.sh.

    # needed if you build on NFS!sudo cp out/Debug/chrome_sandbox /usr/local/sbin/chrome-devel-sandboxsudo chown root:root /usr/local/sbin/chrome-devel-sandboxsudo chmod 4755 /usr/local/sbin/chrome-devel-sandbox
  • Finally, you have to include the following line in your ~/.bashrc (or .zshenv):

    export CHROME_DEVEL_SANDBOX=/usr/local/sbin/chrome-devel-sandbox

Reference

You can find the documentations in:


tl; dr

Linux SUID Sandbox


I had a similar issue and when i run chrome with this flag it worked fine

 --disable-setuid-sandbox