现象:bash:./make_ext4fs: No such file or directory
解决:
一般出现该错误是由于应用程序是32位导致的,可以使用file命令来查看:
[cpp] view plain copy
1. wsh@ubuntu:~/Desktop$ file make_ext4fs
2. make_ext4fs: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, not stripped
3. wsh@ubuntu:~/Desktop$
可以从上面看到make_ext4fs为32位程序,所以我们需要让64位机支持运行32位应用。
执行下面两条命令即可解决问题:
[cpp] view plain copy
1. sudo apt-get install lib32c-dev
[cpp] view plain copy
1. sudo apt-get install lib32stdc++6
再运行make_ext4fs就不会报错了:
[cpp] view plain copy
1. wsh@ubuntu:~/Desktop$ ./make_ext4fs
2. Expected filename after options
3. make_ext4fs [ -l <len> ] [ -j <journal size> ] [ -b <block_size> ]
4. [ -g <blocks per group> ] [ -i <inodes> ] [ -I <inode size> ]
5. [ -L <label> ] [ -f ] [ -a <android mountpoint> ]
6. [ -S file_contexts ]
7. [ -z | -s ] [ -w ] [ -c ] [ -J ] [ -v ]
8. <filename> [<directory>]
9. wsh@ubuntu:~/Desktop$