写在前面
自己的环境:Ubuntu 16.04, ros-kinetic
一、报错信息
编译程序时报错:
By not providing "FindGlog.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Glog", but
CMake did not find one.
Could not find a package configuration file provided by "Glog" with any of
the following names:
GlogConfig.cmake
glog-config.cmake
Add the installation prefix of "Glog" to CMAKE_PREFIX_PATH or set
"Glog_DIR" to a directory containing one of the above files. If "Glog"
provides a separate development package or SDK, be sure it has been
installed.
显然,这是缺少 glog
,需要安装 glog
。
二、解决方法
- 首先下载
glog
:https://github.com/google/glog
,我这里下载的是v0.4.0
- 解压:
unzip glog-0.4.0.zip
- 然后编译安装
cd glog-0.4.0
mkdir build
cd build/
cmake ..
make
sudo make install
接下来再次编译程序,就OK了~