# 源码下载 wget https://nchc.dl.sourceforge.net/project/extundelete/extundelete/0.2.4/extundelete-0.2.4.tar.bz2 # 解压 tar -jxvf extundelete-0.2.4.tar.bz2 # 进入目录并编译安装 cd extundelete-0.2.4 ./configure sudo make && make install
如果上面这几步都完美运行没有报错并得到类似以下的输出那么安装就顺利成功了,下面的报错总结即可跳过。
cd src extundelete -v
输出:
extundelete version 0.2.4 libext2fs version 1.44.1 Processor is little endian.
执行make命令会在src目录下生成 extundelete 可执行文件,可在此直接执行恢复命令, 执行 make install 会将程序安装在 /usr/local/bin/ 下。
$ ./configure Configuring extundelete 0.2.4 Writing generated files to disk
2. 编译时报错
如果在编译 make 时报错:
$ make && make install make -s all-recursive Making all in src insertionops.cc: In function ‘std::ostream& operator<<(std::ostream&, const ext2_inode&)’: insertionops.cc:36:36: error: ‘const struct ext2_inode’ has no member named ‘i_dir_acl’; did you mean ‘i_file_acl’? os <<"Directory ACL: " < ^~~~~~~~~ i_file_acl Makefile:437: recipe for target 'extundelete-insertionops.o' failed make[2]: *** [extundelete-insertionops.o] Error 1 Makefile:268: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 Makefile:208: recipe for target 'all' failed make: *** [all] Error 2
需要打一个补丁:
wget https://sourceforge.net/p/extundelete/tickets/5/attachment/extundelete-0.2.4-e2fsprogs.patch.txt patch -p1./configure sudo make && make install