[This configuration process is based on the Linux system]
Download the source code:
wget -O - https://kheafield.com/code/kenlm.tar.gz |tar xz
Compile:
makdir kenlm/build
cd kenlm/build
cmake .. && make -j4
Found an error:
There is no cmake in the system, according to the error prompt, execute the following command:
sudo apt-get install cmake
After the installation is complete, cmake again:
cmake ..
Another error:
Can't find boost, then download it:
sudo apt install libboost-dev libboost-test-dev
After the installation is complete, continue cmake, speechless, and report an error:
The boost dependency package is not fully installed, so it is simply installed:
sudo apt-get install libboost-all-dev
For the eigen3 package, I tried the method mentioned on the Internet:
cd ~ && wget -O - https://bitbucket.org/eigen/eigen/get/3.2.8.tar.bz2 |tar xj
has a problem:
keep trying
sudo apt-get install libeigen3-dev
No problem, continue with cmake, and find that another package cannot be found:
According to the two packages prompted, download them:
sudo apt-get install libbz2-dev liblzma-dev
cmake ..
Finally no more errors. Then compile:
sudo make -j4
Next wait for the compilation to complete:
After the compilation is complete, execute the download:
sudo make install
OK, kenlm installation is complete~