<p>今天需要转义windows下面的文件,发现centos6.5下面提示 -bash: dos2unix: command not found,</p><p>最终只需要执行这条语句就可以了yum install -y dos2unix</p><p>上网搜索,发现百度里面的安装例子都差不多http://blog.csdn.net/w616589292/article/details/38274475</p><p>但发现按上面的安装步骤,还是提示:</p><p>[root@iZwz93nu0s9j3y9zwzy7bkZ hd2u-1.0.0]# ./configure</p><p>Configuring hd2u 1.0.0</p><p>checking for gcc... gcc</p><p>checking for C compiler default output file name... a.out</p><p>checking whether the C compiler works... yes</p><p>checking whether we are cross compiling... no</p><p>checking for suffix of executables...</p><p>checking for suffix of object files... o</p><p>checking whether we are using the GNU C compiler... yes</p><p>checking whether gcc accepts -g... yes</p><p>checking for gcc option to accept ANSI C... none needed</p><p>checking for a BSD-compatible install... /usr/bin/install -c</p><p>checking for getopt_long in -lpopt... no</p><p>configure: error: *** libpopt not found</p><p>但发现按上面的安装步骤,还是提示:</p><p>rpm -ivh popt-1.8-1.x86_64.rpm 或者 rpm -ivh popt-1.14-2rt.x86_64.rpm,之后还是提示同样的错误。</p><p>后面去下载了popt-1.16.tar.gz,重新安装后发现才能正常使用</p><p>http://www.linuxfromscratch.org/blfs/view/svn/general/popt.html</p><p>tar -xzvf popt-1.16.tar.gz</p><p>cd popt-1.16</p><p>./configure</p><p>make</p><p>make install</p><p>再cd hd2u-1.0.0</p><p>同样的</p><p>./configure</p><p>make</p><p>make install</p><p>用root安装完成后,请重新打开一个界面或者exit。</p><p>最后发现都不可用,坑爹。 -- 最终在网上找了一个命令搞定yum install -y dos2unix</p><p>dos2unix test.txt</p><p>提示:dos2unix: converting file test.txt to UNIX format ...链接!</p>