CrazyDiskInfo硬盘检测工具 安装记录

本文详细介绍了如何在Ubuntu环境下从源码编译并安装CrazyDiskInfo磁盘信息检测工具,包括安装必要的依赖库、克隆源码、配置CMake、解决编译错误及最终的成功安装流程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一、安装相关库

apt-get install libatasmart-dev libncurses5-dev libncursesw5-dev
复制代码

二、克隆源码

git clone https://github.com/otakuto/crazydiskinfo
复制代码

三、进入crazydiskinfo文件夹后编译和运行

mkdir build
cd build
cmake ..
make && make install
crazy
复制代码

四、安装Cmake

root@chenwr-pc:/home/soft/crazydiskinfo/build# apt-get install cmake
Reading 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 upgraded.
Need to get 3,294 kB of archives.
After this operation, 16.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu/ trusty/main cmake-data all 2.8.12.2-0ubuntu3 [676 kB]
Get:2 http://archive.ubuntu.com/ubuntu/ trusty/main cmake amd64 2.8.12.2-0ubuntu3 [2,618 kB]                                                
Fetched 3,294 kB in 1min 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-0ubuntu3_all.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-0ubuntu3_amd64.deb ...
Unpacking cmake (2.8.12.2-0ubuntu3) ...
Processing triggers for man-db (2.6.7.1-1) ...
Setting up cmake-data (2.8.12.2-0ubuntu3) ...
Install cmake-data for emacs24
install/cmake-data: Byte-compiling for emacs24
Wrote /usr/share/emacs24/site-lisp/cmake-data/cmake-mode.elc
Setting up cmake (2.8.12.2-0ubuntu3) ...
复制代码

安装完cmake后执行cmake .. 出现错误

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".
复制代码

解决办法:

  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
复制代码

五、安装成功流程

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 crazy
Scanning 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
复制代码

终端输入crazy,软件界面

六、SMART检测参数

参考资料:

硬盘 SMART 检测参数详解[转] - york_hust - 博客园 www.cnblogs.com/york-hust/p…

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值