解決linux中没有dos2UNIX或者UNIX2dos命令

安装方法:

下载hd2u-1.0.0.tgz:
http://linux.softpedia.com/progDownload/Dos2Unix-Download-5519.html
解压:
tar -zxf hd2u-1.0.0.tgz
编译安装hd2u-1.0.0:
cd hd2u-1.0.0

./configure

make

make install
一般情况下执行./configure后显示错误:
1.Configuring hd2u 1.0.0  
2.checking for gcc... gcc  
3.checking for C compiler default output file name... a.out  
4.checking whether the C compiler works... yes  
5.checking whether we are cross compiling... no  
6.checking for suffix of executables...   
7.checking for suffix of object files... o  
8.checking whether we are using the GNU C compiler... yes  
9.checking whether gcc accepts -g... yes  
10.checking for gcc option to accept ANSI C... none needed  
11.checking for a BSD-compatible install... /usr/bin/install -c  
12.checking for getopt_long in -lpopt... no  
13.configure: error: *** libpopt not found  
下载popt-1.16.tar.gz
http://www.linuxfromscratch.org/blfs/view/svn/general/popt.html
编译安装popt-1.16:
tar -xzvf popt-1.16.tar.gz 

cd popt-1.16

./configure

make

make install
再次安装hd2u-1.0.0:
cd hd2u-1.0.0

./configure

make

make install
执行以下命令,查看是否安装成功:
[root@localhost ~]#whereis dos2unix
dos2unix: /usr/local/bin/dos2unix
发布了68 篇原创文章 · 获赞 4 · 访问量 7366

猜你喜欢

转载自blog.csdn.net/weixin_44455388/article/details/104432330