Search code examples
raspberry-pivcpkg

VCPKG_FORCE_SYSTEM_BINARIES Errors when Running vcpkg on raspberry pi


I installed the latest version of cmake and was following some instructions i made to integrate a project that used vcpkg with grpc. After installing vcpkg I try to install package with ./vcpkg install grpc which resulted in the error bellow. The instructions worked on a OSX and Ubuntu but I run into issues with raspberry pi.

I have set tried both 0 and 1 like so $VCPKG_FORCE_SYSTEM_BINARIES=1 but neither option is working. Using ./vcpkg result in a VCPKG_FORCE_SYSTEM_BINARIES error:

pi@raspberrypi:~/vcpkg $ ./vcpkg 
Environment variable VCPKG_FORCE_SYSTEM_BINARIES must be set on arm and s390x platforms.
pi@raspberrypi:~/vcpkg $ VCPKG_FORCE_SYSTEM_BINARIES=1
pi@raspberrypi:~/vcpkg $ echo $VCPKG_FORCE_SYSTEM_BINARIES
1
pi@raspberrypi:~/vcpkg $ ./vcpkg 
Environment variable VCPKG_FORCE_SYSTEM_BINARIES must be set on arm and s390x platforms.

Solution

  • In bash the environment variable is set with export:

    export VCPKG_FORCE_SYSTEM_BINARIES=1
    ./vcpkg install grpc
    

    The export command can be put in .bashrc to persist this setting.

    src: https://github.com/microsoft/vcpkg/issues/14140