First, install related libraries

apt-get install libatasmart-dev libncurses5-dev libncursesw5-dev
Copy the code

Two, clone the source code

git clone https://github.com/otakuto/crazydiskinfo
Copy the code

3. Go to the crazyDiskInfo folder and compile and run

mkdir build
cd build
cmake ..
make && make install
crazy
Copy the code

Install Cmake

root@chenwr-pc:/home/soft/crazydiskinfo/build# apt-get install cmakeReading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: cmake-data Suggested packages: codeblocks eclipse The following NEW packages will be installed: cmake cmake-data 0 upgraded, 2 newly installed, 0 to remove and 751 not upgrade. Need to get 3,294 kB of archives. After this operation, 16.6 MB of Additional disk space will be used. Do you want tocontinue? [Y/n] Y Get: 1 http://archive.ubuntu.com/ubuntu/ trusty/main cmake - data all 2.8.12.2 0 ubuntu3 [676 kB] Get: 2 http://archive.ubuntu.com/ubuntu/ trusty/main cmake amd64 2.8.12.2 0 ubuntu3 [2618 kB] Fetched 3294 kBin1min 10s (46.5 kB/s) Selecting previously unselected package cmake-data. (Reading database... 183256 files and directories currently installed.) Preparing to unpack ... / cmake - data_2. 8.12.2 ubuntu3_all 0. Deb... ERROR: cmake-data is broken - called emacs-package-install as a new-style add-on, But has no compat file. Unpacking cmake-data (2.8.12.2-0ubuntu3)... Selecting previously unselected package cmake. Preparing to unpack ... / cmake_2 8.12.2-0 ubuntu3_amd64. Deb... Unpacking cmake (2.8.12.2 ubuntu3 0)... Processing triggersforMan - db (2.6.7.1-1)... Setting up cmake-data (2.8.12.2-0ubuntu3)... Install cmake-datafor emacs24
install/cmake-data: Byte-compiling for/usr/share/emacs24/site-lisp/cmake-data/cmake-mode.elc Setting up cmake (2.8.12.2-0ubuntu3)...Copy the code

After installing cmake, execute cmake.. There is an error

root@chenwr-pc:/home/soft/crazydiskinfo/build# cmake ..
-- The CXX compiler identification is unknown
CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found.   Please set CMAKE_CXX_COMPILER to a valid compiler path or name.
-- Configuring incomplete, errors occurred!
See also "/home/soft/crazydiskinfo/build/CMakeFiles/CMakeOutput.log".
See also "/home/soft/crazydiskinfo/build/CMakeFiles/CMakeError.log".
Copy the code

Solutions:

  1. sudo apt-get install g++
  2. cmake -D CMAKE_CXX_COMPILER=”g++” CMAKE -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX:PATH=”/usr/local” .
root@chenwr-pc:/home/soft/crazydiskinfo/build# cmake -D CMAKE_CXX_COMPILER="g++" CMAKE -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX:PATH="/usr/local" .
-- The CXX compiler identification is GNU 4.8.4
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/soft/crazydiskinfo/build
Copy the code

5. Successful installation process

root@chenwr-pc:/home/soft/crazydiskinfo/build# cmake ..
-- Configuring done
-- Generating done
-- Build files have been written to: /home/soft/crazydiskinfo/build
root@chenwr-pc:/home/soft/crazydiskinfo/build# make && make install crazyScanning dependencies of target CrazyDiskInfo [100%] Building CXX object CMakeFiles/CrazyDiskInfo.dir/main.cpp.o Linking  CXX executable crazy [100%] Built target CrazyDiskInfo [100%] Built target CrazyDiskInfo Linking CXX executable CMakeFiles/CMakeRelink.dir/crazy Install the project... -- Install configuration:"Release"
-- Installing: /usr/sbin/crazy
Copy the code

Terminal input crazy, software interface

6. SMART detection Parameters

References:

– York_hust – Blogpark www.cnblogs.com/york-hust/p…