1)用yum源安装dos2unix报错
[home@localhost ~]$ sudo yum -y install dos2unix
Loaded plugins: fastestmirror
file:///mnt/repodata/repomd.xml: [Errno 14] curl#37 - "Couldn't open file /mnt/repodata/repomd.xml"
Trying other mirror.
Loading mirror speeds from cached hostfile
Package matching dos2unix-6.0.3-4.el7.x86_64 already installed. Checking for update.
Nothing to do
2)改用rpm包直接安装,先到 http://rpm.pbone.NET/ 下载dos2unix的安装包dos2unix-7.3.4-1.mga6.x86_64.rpm
[home@localhost temp]$ sudo rpm -ivh dos2unix-7.3.4-1.mga6.x86_64.rpm
[sudo] password for home:
warning: dos2unix-7.3.4-1.mga6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID 80420f66: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:dos2unix-7.3.4-1.mga6 ################################# [100%]
安装成功可执行程序在/bin/dos2unix下。