linux中没有dos2UNIX或者UNIX2dos命令解决办法

安装方法:

在http://linux.softpedia.com/progDownload/Dos2Unix-Download-5519.html下载hd2u-1.0.0.tgz

[root@localhost ~]#tar -zxf hd2u-1.0.0.tgz

[root@localhost ~]#cd hd2u-1.0.0

[root@localhost ~]#./configure

 

[python]  view plain copy
 
 
  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  
  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

 

 

在http://rpm.pbone.net/index.php3/stat/4/idpl/17960519/dir/other/com/popt-1.14-2rt.x86_64.rpm.html下载popt-1.14-2rt.x86_64.rpm

[root@localhost ~]#rpm  -ivh popt-1.14-2rt.x86_64.rpm

[root@localhost ~]#cd hd2u-1.0.0

[root@localhost ~]#./configure&&make&&make install

[root@localhost ~]#whereis dos2unix

dos2unix: /usr/local/bin/dos2unix

安装成功

 

 

如上述步骤执行whereis dos2unix :没有返回路径请执行下面。

 

 

 

 

今天需要转义windows下面的文件,发现centos6.5下面提示 -bash: dos2unix: command not found,

最终只需要执行这条语句就可以了yum install -y dos2unix

上网搜索,发现百度里面的安装例子都差不多http://blog.csdn.net/w616589292/article/details/38274475

但发现按上面的安装步骤,还是提示:

[root@iZwz93nu0s9j3y9zwzy7bkZ hd2u-1.0.0]# ./configure
Configuring hd2u 1.0.0
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 for a BSD-compatible install... /usr/bin/install -c
checking for getopt_long in -lpopt... no
configure: error: *** libpopt not found

 

但发现按上面的安装步骤,还是提示:

rpm -ivh popt-1.8-1.x86_64.rpm 或者 rpm -ivh popt-1.14-2rt.x86_64.rpm,之后还是提示同样的错误。

后面去下载了popt-1.16.tar.gz,重新安装后发现才能正常使用

http://www.linuxfromscratch.org/blfs/view/svn/general/popt.html

 

tar -xzvf popt-1.16.tar.gz 

cd popt-1.16

./configure

make

make install

 

再cd hd2u-1.0.0

同样的

 

./configure

make

make install

用root安装完成后,请重新打开一个界面或者exit。

转载于:https://www.cnblogs.com/zuolun2017/p/9381174.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值