From 4636b7c724acf18f81894d5848da5d9225b134f7 Mon Sep 17 00:00:00 2001 From: Lutkin Wang Date: Thu, 20 Feb 2020 13:44:02 +0800 Subject: [PATCH] Add troubleshooting information for INSTALL.md and enhance readability (#1274) * Update INSTALL.md 1. Add new troubleshooting message; 2. Enhance readability. Signed-off-by: Lutkin Wang * Update INSTALL.md Signed-off-by: Lutkin Wang * Update INSTALL.md Signed-off-by: Lutkin Wang * Update INSTALL.md Add CentOS link. Signed-off-by: Lutkin Wang --- INSTALL.md | 91 +++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 70 insertions(+), 21 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 255e095792..04f3b0b177 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,21 +1,37 @@ # Install Milvus from Source Code + + - [Build from source](#build-from-source) + - [Requirements](#requirements) + - [Compilation](#compilation) + - [Launch Milvus server](#launch-milvus-server) - [Compile Milvus on Docker](#compile-milvus-on-docker) + - [Step 1 Pull Milvus Docker images](#step-1-pull-milvus-docker-images) + - [Step 2 Start the Docker container](#step-2-start-the-docker-container) + - [Step 3 Download Milvus source code](#step-3-download-milvus-source-code) + - [Step 4 Compile Milvus in the container](#step-4-compile-milvus-in-the-container) - [Troubleshooting](#troubleshooting) + - [Error message: `protocol https not supported or disabled in libcurl`](#error-message-protocol-https-not-supported-or-disabled-in-libcurl) + - [Error message: `internal compiler error`](#error-message-internal-compiler-error) + - [Error message: `error while loading shared libraries: libmysqlpp.so.3`](#error-message-error-while-loading-shared-libraries-libmysqlppso3) + - [CMake version is not supported](#cmake-version-is-not-supported) + + ## Build from source ### Requirements - Ubuntu 18.04 or higher +- CentOS 7 - If your operating system is not Ubuntu 18.04 or higher, we recommend you to pull a [docker image of Ubuntu 18.04](https://docs.docker.com/install/linux/docker-ce/ubuntu/) as your compilation environment. +If your operating system does not meet the requirements, we recommend that you pull a Docker image of [Ubuntu 18.04](https://docs.docker.com/install/linux/docker-ce/ubuntu/) or [CentOS 7](https://docs.docker.com/install/linux/docker-ce/centos/) as your compilation environment. -- GCC 7.0 or higher to support C++17 +- GCC 7.0 or higher to support C++ 17 - CMake 3.12 or higher -##### For GPU-enabled version, you will also need: +For GPU-enabled version, you will also need: - CUDA 10.0 or higher - NVIDIA driver 418 or higher @@ -31,19 +47,34 @@ $ ./ubuntu_build_deps.sh #### Step 2 Build +##### Build in Ubuntu + ```shell $ cd [Milvus root path]/core $ ./build.sh -t Debug +``` + or + +```shell $ ./build.sh -t Release ``` -By default, it will build CPU-only version. To build GPU version, add `-g` option +##### Build in CentOS + +```shell +$ cd [Milvus root path]/core +$ ./centos7_build_deps.sh +``` + +By default, it will build CPU-only version. To build GPU version, add `-g` option. + ```shell $ ./build.sh -g ``` -If you want to know the complete build options, run +If you want to know the complete build options, run the following command. + ```shell $./build.sh -h ``` @@ -147,29 +178,47 @@ $ ./start_server.sh ## Troubleshooting -1. If you encounter the following error when compiling: -`protocol https not supported or disabled in libcurl`. -First, make sure you have `libcurl4-openssl-dev` installed in your system. -Then try reinstalling the latest CMake from source with `--system-curl` option: +### Error message: `protocol https not supported or disabled in libcurl` + +Follow the steps below to solve this problem: + +1. Make sure you have `libcurl4-openssl-dev` installed in your system. +2. Try reinstalling the latest CMake from source with `--system-curl` option: ```shell - $ ./bootstrap --system-curl - $ make + $ ./bootstrap --system-curl + $ make $ sudo make install ``` - If the `--system-curl` command doesn't work, you can also reinstall CMake in **Ubuntu Software** on your local computer. -2. If you encounter the following error when compiling in a Docker image: `internal compiler error`. Try increasing the memory allocated to docker first. + If the `--system-curl` command doesn't work, you can also reinstall CMake in **Ubuntu Software** on your local computer. -3. If you encounter the following error during compilation: +### Error message: `internal compiler error` - ``` - .../bin/milvus_server: error while loading shared libraries: libmysqlpp.so.3: cannot open shared object file: No such file or directory - ``` +Try increasing the memory allocated to docker. + +### Error message: `error while loading shared libraries: libmysqlpp.so.3` + +Follow the steps below to solve this problem: - Try the following solutions: - - 1. Check whether `libmysqlpp.so.3` is correctly installed; - 2. If `libmysqlpp.so.3` is installed, check whether it is added to `LD_LIBRARY_PATH`. +1. Check whether `libmysqlpp.so.3` is correctly installed. +2. If `libmysqlpp.so.3` is installed, check whether it is added to `LD_LIBRARY_PATH`. +### CMake version is not supported +Follow the steps below to install a supported version of CMake: + +1. Remove the unsupported version of CMake. +2. Get CMake 3.12 or higher. Here we get CMake 3.12. + + ```shell + $ wget https://cmake.org/files/v3.12/cmake-3.12.2-Linux-x86_64.tar.gz + ``` + +3. Extract the file and install CMake. + + ```shell + $ tar zxvf cmake-3.12.2-Linux-x86_64.tar.gz + $ mv cmake-3.12.2-Linux-x86_64 /opt/cmake-3.12.2 + $ ln -sf /opt/cmake-3.12.2/bin/* /usr/bin/ + ```