Fedora 25 安装 fdutils 缺少 linux/ext2_fs.h

Fedora 25 安装 fdutils 缺少 linux/ext2_fs.h

我尝试在 Fedora 25 上安装 fdutils,并运行 ./configure 输出以下内容:

checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking whether gcc needs -traditional... no
checking for a BSD-compatible install... /bin/install -c
checking whether ln -s works... yes
checking for install-info... /sbin/install-info
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking linux/ext_fs.h usability... no
checking linux/ext_fs.h presence... no
checking for linux/ext_fs.h... no
checking linux/xia_fs.h usability... no
checking linux/xia_fs.h presence... no
checking for linux/xia_fs.h... no
checking sys/sysmacros.h usability... yes
checking sys/sysmacros.h presence... yes
checking for sys/sysmacros.h... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating doc/Makefile
config.status: creating config.h
config.status: config.h is unchanged

请注意失败的底部行,特别是查找 linux/ext_fs.h 和 linux/xia_fs.h。由于缺少这些头文件,运行 make 失败,因此我无法安装 fdutils 包。我尝试过使用apt-get install e2fslibs,但无法找到该包。

答案1

你的标题表明你正在使用 Fedora。然而,你正在使用apt.这是不可能的,dnf包管理器是这样的。

可以做这个:yum install e2fsprogs-devel

但它没有ext_fs.h。目前尚不清楚您想要实现什么目标,我假设该软件已经很久没有更新了。不保证安装该软件包会产生您想要的结果。

答案2

我对面临同样问题的 Fedora 23 环境进行了重新编译。但确切地说:您的问题不是缺少 EXT 或 XIA 文件系统,它们均由配置脚本处理(如果当前环境没有,则选择退出),但 fdmount 命令期望 EXT2 文件系统存在,因此需要相应的头文件。较新的 Linux 发行版似乎将此文件移动到另一个位置。我使用了以下补丁:

--- fdutils-5.5/src/fdmount.c.ORIG      2005-03-03 23:09:16.000000000 +0100
+++ fdutils-5.5/src/fdmount.c   2018-03-06 15:11:02.924092624 +0100
@@ -22,7 +22,7 @@
 #include <linux/ext_fs.h>
 #endif

-#include <linux/ext2_fs.h>
+#include <ext2fs/ext2_fs.h>

 #ifdef HAVE_LINUX_XIA_FS_H
 #include <linux/xia_fs.h>

有了这个和包的存在e2fsprogs-开发(使用命令 dnf 进行安装),我可以编译并安装该包。您可能不会错过 XIAFS(Minix 文件系统)和旧的 EXTFS(旧的 Linux 文件系统)...除了以这种方式格式化的非常旧的软盘(可能,但不太可能)。

相关内容