CMake Error for Redis #RG2 (C++)

I’m new to C++ and trying to work through the Redis challenge. I can’t get the project to build locally (using ./spawn_redis_server.sh. I’m on an M1 Mac, I have CMake and vcpkg installed. I’ve set VCPKG_ROOT and CMAKE_TOOLCHAIN_FILE. And I’m still hitting the following error:

CMake Error at CMakeLists.txt:11 (find_package):
  Could not find a package configuration file provided by "asio" with any of
  the following names:

    asioConfig.cmake
    asio-config.cmake

  Add the installation prefix of "asio" to CMAKE_PREFIX_PATH or set
  "asio_DIR" to a directory containing one of the above files.  If "asio"
  provides a separate development package or SDK, be sure it has been
  installed.


-- Configuring incomplete, errors occurred!

What else am I missing here? I think this challenge requires some more instructions for how to set it up locally on Mac. Its very confusing for less experienced C++ devs like myself.

1 Like

install vckpg. brew install vcpkg then

git clone https://github.com/microsoft/vcpkg "$HOME/vcpkg"
export VCPKG_ROOT="$HOME/vcpkg"

vcpkg install
./spawn_redis_server.sh
3 Likes

Thanks @nix010 solved my problem

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.