# UDM 编译安装 ## 硬件配置需求 以下为参考配置: - 18.04.1-Ubuntu SMP x86 64 GNU/Linux - 建议 4C/8G ## 部署教程 ```bash git clone http://git.opensource5g.org/openxg/udm.git # 进入目录 cd SimpleUDM && mkdir build && cd build && cmake .. # 编译 sudo make # 运行 UDM sudo ./udm/build/udm-api-server ``` ## 问题 问题 1: `fatal error: pistache/http.h: No such file or directory` ```bash git clone https://github.com/oktal/pistache.git cd pistache mkdir build cd build cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release .. make sudo make install ``` 问题 2: `fatal error: nlohmann/json.hpp: No such file or directory` ```bash git clone https://github.com/nlohmann/json.git mkdir build cd build cmake .. make make install ``` 问题 3: ``` /usr/local/include/pistache/http_headers.h:38:24: error: no matching function for call to ‘equal(std::__cxx11::basic_string::const_iterator, std::__cxx11::basic_string::const_iterator, std::__cxx11::basic_string::const_iterator, std::__cxx11::basic_string::const_iterator, Pistache::Http::Header::LowercaseEqual::operator()(const string&, const string&) const::)'}); ``` ``` # 原因是由于使用了旧版本 C++ 编译环境,需要修改 udm/CMakeLists.txt 中: # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pg -g3" ) # -> set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -pg -g3" ) ``` issue 链接:`The Pistache must be compiled under C++14 , it seems you are using older version of C++`,https://github.com/pistacheio/pistache/issues/664