You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
vcpkg.io: Non-root remote user has no permissions to write to vcpkg root #277
The vcpkg.io feature clones microsoft/vcpkg repository to /usr/local/share/vcpkg
When the vcpkg install command is run, vcpkg tries to write to this directory the source files and built binaries of the dependencies it is installing. The command fails because the remote user has no permissions to write to this directory.
$ vcpkg install
error: try_take_exclusive_file_lock("/usr/local/share/vcpkg/buildtrees/vcpkg-running.lock"): No such file or directory
/usr/local/share/vcpkg/buildtrees/vcpkg-running.lock: error: failed to take lock, another vcpkg may be running against the same directory
$ ls -ld /usr/local/share/vcpkg/
drwxr-xr-x 10 root root 4096 Sep 13 04:15 /usr/local/share/vcpkg/
I can fix this with "postCreateCommand": "sudo chown -R vscode:vscode /usr/local/share/vcpkg/", but maybe the feature could also create a new vcpkg group, set it as owner for vcpkg root dir, add group write permissions, and assign a named user to the group.
It would also be possible to run vcpkg with special flags that set the written-to paths, but that's a bit inconvenient and there are currently (microsoft/vcpkg#16098) no environment variables that do the same.
Activity