I would like to install the nlohmann_json v3.7.0 and use it in a c++ project.
In my CMakeLists.txt i added:
find_package(nlohmann_json 3.7.0 REQUIRED)
target_link_libraries(configuration PRIVATE nlohmann_json::nlohmann_json)
Ubuntu 16.04
cmake version 3.5.2
cmake_minimum_required(VERSION 3.10)
set(CMAKE_CXX_STANDARD 17)
nlohmann_json v3.7.0
When I try to build I get the following error:
Could not find a configuration file for package "nlohmann_json" that is
compatible with requested version "3.7.0".
The following configuration files were considered but not accepted:
/usr/local/lib/cmake/nlohmann_json/nlohmann_jsonConfig.cmake, version: 3.7.0 (64bit)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I have the same issue.
Looks like ubuntu 16.04 xenial can't install the nlohmann package
sudo apt-get install nlohmann-json-dev
always shows to me, can't locate the package
@AustinJia apt packages an old version of json (2.1.1-1.1) that doesn't seem to support this method.
sudo apt-get install nlohmann-json3-dev helped me
sudo apt-get install nlohmann-json3-devhelped me
i get an error:
Unable to locate package nlohmann-json3-dev
Most helpful comment
I have the same issue.
Looks like ubuntu 16.04 xenial can't install the nlohmann package
sudo apt-get install nlohmann-json-devalways shows to me, can't locate the package