我已经尝试过虚拟盒子和码头工具来安装centos,最新版本,没有" mke2fs"命令。然后我尝试使用root并输入:
yum install mke2fs*
Loaded plugins: fastestmirror, ovl
Setting up Install Process
Loading mirror speeds from cached hostfile
...... 没有包mke2fs *可用。
这是为什么?它是否在mke2fs以外的另一个包名称中?
答案 0 :(得分:1)
您可以使用yum provides
。
提供 =查找哪个包提供给定值
$ yum provides mke2fs
e2fsprogs-1.42.9-9.el7.x86_64 : Utilities for managing ext2, ext3, and ext4 filesystems
Repo : base
Matched from:
Filename : /usr/sbin/mke2fs
所以我安装了e2fsprogs(我在docker中做过):
FROM centos:7
RUN yum -y update && \
yum -y install e2fsprogs
构建它并启动我的容器:
$ docker run -it my-centos bash
[root@1ef2a7d930cf /]# mke2fs
Usage: mke2fs [-c|-l filename] [-b block-size] [-C cluster-size]
[-i bytes-per-inode] [-I inode-size] [-J journal-options]
[-G flex-group-size] [-N number-of-inodes]
[-m reserved-blocks-percentage] [-o creator-os]
[-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]
[-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]
[-t fs-type] [-T usage-type ] [-U UUID] [-jnqvDFKSV] device [blocks-count]