前言:
最近在做任务时用到KenLM (KenLM Language Model Toolkit)一开始在公司服务器上安装,根据官方的安装向导来,很顺利。完成任务后,由于疫情影响一直远程办公,操作大量的数据不方便,就想着在自己ubuntu 18.04上安装一下 KenLM,结果在“cmake …”就出错了。
官方安装如下:
wget -O - https://kheafield.com/code/kenlm.tar.gz |tar xz
# 或者 git clone https://github.com/kpu/kenlm.git
mkdir kenlm/build
cd kenlm/build
cmake ..
make -j4
ubuntu 18.04 ,“cmake …”错误如下:
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
Boost_INCLUDE_DIR (ADVANCED)
...
-- Configuring incomplete, errors occurred!
See also "/home/MyExperimentLab/KenLM_space/kenlm/build/CMakeFiles/CMakeOutput.log".
See also "/home/MyExperimentLab/KenLM_space/kenlm/build/CMakeFiles/CMakeError.log".
第一次尝试解决方法:
出错后到官方和github,于是出现了如下错误,不通,换思路。与gcc版本无关。
build-essential 已经是最新版 (12.4ubuntu1)。
zlib1g-dev 已经是最新版 (1:1.2.11.dfsg-0ubuntu2)。
cmake 已经是最新版 (3.10.2-1ubuntu2.18.04.1)。
有一些软件包无法被安装。如果您用的是 unstable 发行版,这也许是
因为系统无法达到您要求的状态造成的。该版本中可能会有一些您需要的软件
包尚未被创建或是它们已被从新到