Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing on Ubuntu 16.04 #1703

Closed
wiggitamoo opened this issue Aug 9, 2019 · 8 comments
Closed

Installing on Ubuntu 16.04 #1703

wiggitamoo opened this issue Aug 9, 2019 · 8 comments
Labels
kind: question state: stale the issue has not been updated in a while and will be closed automatically soon unless it is updated

Comments

@wiggitamoo
Copy link

wiggitamoo commented Aug 9, 2019

  • Describe what you want to achieve.

I would like to install the nlohmann_json v3.7.0 and use it in a c++ project.

  • Describe what you tried.
  1. Download the zip file to my Ubuntu 16.04 machine.
  2. Unzip the package
  3. mkdir build
  4. cd build
  5. cmake ..
  6. make
  7. make install

In my CMakeLists.txt i added:

find_package(nlohmann_json 3.7.0 REQUIRED)
target_link_libraries(configuration PRIVATE nlohmann_json::nlohmann_json)
  • Describe which system (OS, compiler) you are using.

Ubuntu 16.04
cmake version 3.5.2
cmake_minimum_required(VERSION 3.10)
set(CMAKE_CXX_STANDARD 17)

  • Describe which version of the library you are using (release version, develop branch).

nlohmann_json v3.7.0

  • Describe the problem

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)
@stale
Copy link

stale bot commented Sep 8, 2019

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.

@stale stale bot added the state: stale the issue has not been updated in a while and will be closed automatically soon unless it is updated label Sep 8, 2019
@stale stale bot closed this as completed Sep 15, 2019
@AustinJia
Copy link

AustinJia commented Oct 15, 2019

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

@danem
Copy link

danem commented Jan 23, 2020

@AustinJia apt packages an old version of json (2.1.1-1.1) that doesn't seem to support this method.

@olehskip
Copy link

olehskip commented Sep 6, 2020

sudo apt-get install nlohmann-json3-dev helped me

@anancds
Copy link

anancds commented Sep 17, 2020

sudo apt-get install nlohmann-json3-dev helped me

i get an error:
Unable to locate package nlohmann-json3-dev

@Sheridan
Copy link

Unable to locate package nlohmann-json3-dev

repository ppa:team-xbmc/ppa

@mstanton-impinj
Copy link

sudo apt-get install nlohmann-json3-dev worked for Ubuntu 20.04

@xeron56
Copy link

xeron56 commented Oct 10, 2021

using vcpkg install nlohmann-json works on ubuntu 16.04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: question state: stale the issue has not been updated in a while and will be closed automatically soon unless it is updated
Projects
None yet
Development

No branches or pull requests

8 participants