栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

Centos6 安装 ntfs-3g,为 挂载 NTFS格式的U盘做准备

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Centos6 安装 ntfs-3g,为 挂载 NTFS格式的U盘做准备

前言:

        Centos 默认不支持 NTFS 格式的U盘,如果要加载只能借助第三方软件 ntfs-3g 。

实现方式:

        1、通过网络yum源方式,在线安装(忽略);

        2、 通过官网下载,然后手动编译安装。

        我推荐选择第二种方式,对于初学者来说,通过官网下载方式更简单更直接,可以省去不会写配置文件的烦恼。

具体步骤: 第一步、进入官网下载

1、官网地址:

https://tuxera.com/opensource/ntfs-3g_ntfsprogs-2021.8.22.tgz

2、百度网盘:

链接:https://pan.baidu.com/s/152QykTkXNa4NJrqYStBHKw 
提取码:g5xh 

第二步、上传到虚拟机

        通过远程传输工具,将下载的安装包上传传到虚拟机/usr/local/src/目录;

 第三步、解压 ntfs-3g_ntfsprogs-2021.8.22.tgz

        进入目录/usr/local/src/,解压ntfs-3g_ntfsprogs-2021.8.22.tgz

[root@localhost src]# cd /usr/local/src
[root@localhost src]# ls
ntfs-3g_ntfsprogs-2021.8.22.tgz
[root@localhost src]# tar -zxvf ntfs-3g_ntfsprogs-2021.8.22.tgz
第四步、解压完毕,ls查看解压结果
[root@localhost src]# ls
ntfs-3g_ntfsprogs-2021.8.22  ntfs-3g_ntfsprogs-2021.8.22.tgz
第五步、进入目录ntfs-3g_ntfsprogs-2021.8.22
[root@localhost src]# cd ntfs-3g_ntfsprogs-2021.8.22
[root@localhost ntfs-3g_ntfsprogs-2021.8.22]# 
第六步、编译准备./configure
[root@localhost ntfs-3g_ntfsprogs-2021.8.22]# ./configure 
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports the include directive... yes (GNU style)
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/usr/local/src/ntfs-3g_ntfsprogs-2021.8.22':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details

当前编译出错,提示如下
        configure: error: no acceptable C compiler found in $PATH

解决办法:安装gcc编译器即可解决

安装编译器直通车:

CentOS6 安装gcc编译器,解决【configure: error: no acceptable C compiler found in $PATH】问题_走向运维的老男孩的博客-CSDN博客

第七步、重新编译准备 ./configure
[root@localhost ntfs-3g_ntfsprogs-2021.8.22]# ./configure 
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
...
checking for dlopen in -lc... no
checking for dlopen in -ldl... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
...
config.status: creating src/Makefile
config.status: creating src/ntfs-3g.8
config.status: creating src/ntfs-3g.probe.8
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
/bin/rm: cannot remove `libtoolT': No such file or directory
You can type now 'make' to build ntfs-3g.

            说明:编译准备完成后,提示“You can type now 'make' to build ntfs-3g”,接下来进行编译。

第八步、编译make
[root@localhost ntfs-3g_ntfsprogs-2021.8.22]# make
make  all-recursive
make[1]: Entering directory `/usr/local/src/ntfs-3g_ntfsprogs-2021.8.22'
Making all in include
make[2]: Entering directory `/usr/local/src/ntfs-3g_ntfsprogs-2021.8.22/include'
Making all in ntfs-3g
...
make[2]: Leaving directory `/usr/local/src/ntfs-3g_ntfsprogs-2021.8.22/src'
make[2]: Entering directory `/usr/local/src/ntfs-3g_ntfsprogs-2021.8.22'
make[2]: Leaving directory `/usr/local/src/ntfs-3g_ntfsprogs-2021.8.22'
make[1]: Leaving directory `/usr/local/src/ntfs-3g_ntfsprogs-2021.8.22'
第九步、编译安装make installl
[root@localhost ntfs-3g_ntfsprogs-2021.8.22]# make install
Making install in include
make[1]: Entering directory `/usr/local/src/ntfs-3g_ntfsprogs-2021.8.22/include'
Making install in ntfs-3g
make[2]: Entering directory `/usr/local/src/ntfs-3g_ntfsprogs-2021.8.22/include/ntfs-3g'
make[3]: Entering directory `/usr/local/src/ntfs-3g_ntfsprogs-2021.8.22/include/ntfs-3g'
make[3]: Nothing to be done for `install-exec-am'.
...
make[2]: Leaving directory `/usr/local/src/ntfs-3g_ntfsprogs-2021.8.22/src'
make[1]: Leaving directory `/usr/local/src/ntfs-3g_ntfsprogs-2021.8.22/src'
make[1]: Entering directory `/usr/local/src/ntfs-3g_ntfsprogs-2021.8.22'
make[2]: Entering directory `/usr/local/src/ntfs-3g_ntfsprogs-2021.8.22'
make[2]: Nothing to be done for `install-exec-am'.
 /bin/mkdir -p '/usr/local/share/doc/ntfs-3g'
 /usr/bin/install -c -m 644 README '/usr/local/share/doc/ntfs-3g'
make[2]: Leaving directory `/usr/local/src/ntfs-3g_ntfsprogs-2021.8.22'
make[1]: Leaving directory `/usr/local/src/ntfs-3g_ntfsprogs-2021.8.22'
第十步、验证
[root@localhost ntfs-3g_ntfsprogs-2021.8.22]# ntfs-3g --version
ntfs-3g 2021.8.22 integrated FUSE 27

        验证成功!

小结:

        只要解决了编译器问题,其他问题都是小问题。另外注意一下编译安装时make和install之间要有空格隔开,否则执行不了命令。

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/842301.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号