通路本站觀看效果更佳
Download
LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values.
The project page is leveldb
After cloning the project,then let’s build the project.
Building
mkdir -p build && cd build
cmake -DCMAKE_BUILD_TYPE=Release .. && cmake --build .
I just uing Ubuntu16.04. I have encountered an error as shown below.
CMake Error at CMakeLists.txt:5 (cmake_minimum_required):
CMake 3.9 or higher is required. You are running version 3.5.1
-- Configuring incomplete, errors occurred!
Let us solve this problem.
- To install the latest version,we have first to remove the installed version.
sudo apt purge cmake
- Then go to cmake and download the latest version you need.
- In my case cmake-3.12.1-Linux-x86_64.sh is sufficient.
-
(use your own file location here, but chmod makes the script executable)chmod +x /path/to/cmake-3.12.1-Linux-x86_64.sh
-
(you’ll need to press y twice)sudo ./path/to/cmake-3.12.1-Linux-x86_64.sh
-
(Use absolute path.)sudo ln -s /path/to/cmake-3.6.2-Linux-x86_64/bin/* /usr/local/bin
- Test your results with
typecmake --version
cmake -DCMAKE_BUILD_TYPE=Release .. && cmake --build .
Successful.