關於錯誤IOError:的解決

 fedora安裝Tftp時出錯:網上對此問題解決方法很多,但都沒有解決此問題,最終還是從鳥哥的書上找到答案。

錯誤信息如下:

[root@tom ~]# yum install xinetd tftp tftp-server
Loaded plugins: refresh-packagekit
http://ftp-stud.hs-esslingen.de/pub/Mirrors/archive.fedoraproject.org/fedora/linux/releases/9/Everything/i386/os/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror.
http://fedora-mirror01.rbc.ru/pub/fedora-archive/fedora/linux/releases/9/Everything/i386/os/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror.
http://dl.fedoraproject.org/pub/archive/fedora/linux/releases/9/Everything/i386/os/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: fedora. Please verify its path and try again


解決方法:

[root@tom /]# yum search tftp
Loaded plugins: refresh-packagekit
================================ Matched: tftp =================================
bootparamd.i386 : A server process which provides boot information to diskless
                : clients
curl.i386 : A utility for getting files from remote servers (FTP, HTTP, and
          : others)
jakarta-commons-net.noarch : Internet protocol suite Java library
tcp_wrappers.i386 : A security tool which acts as a wrapper for TCP daemons
tftp.i386 : The client for the Trivial File Transfer Protocol (TFTP)
tftp-server.i386 : The server for the Trivial File Transfer Protocol (TFTP)
[root@tom /]# yum install tftp.i386
Loaded plugins: refresh-packagekit
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package tftp.i386 0:0.48-3.fc9 set to be updated
--> Finished Dependency Resolution


Dependencies Resolved


=============================================================================
 Package                 Arch       Version          Repository        Size 
=============================================================================
Installing:
 tftp                    i386       0.48-3.fc9       fedora             28 k


Transaction Summary
=============================================================================
Install      1 Package(s)         
Update       0 Package(s)         
Remove       0 Package(s)         


Total download size: 28 k
Is this ok [y/N]: y
Downloading Packages:
(1/1): tftp-0.48-3.fc9.i386.rpm                          |  28 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing: tftp                         ######################### [1/1] 


Installed: tftp.i386 0:0.48-3.fc9
Complete!
[root@tom /]# yum install tftp-server.i386 
Loaded plugins: refresh-packagekit
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package tftp-server.i386 0:0.48-3.fc9 set to be updated
--> Processing Dependency: xinetd for package: tftp-server
--> Running transaction check
---> Package xinetd.i386 2:2.3.14-18.fc9 set to be updated
--> Finished Dependency Resolution


Dependencies Resolved


=============================================================================
 Package                 Arch       Version          Repository        Size 
=============================================================================
Installing:
 tftp-server             i386       0.48-3.fc9       fedora             35 k
Installing for dependencies:
 xinetd                  i386       2:2.3.14-18.fc9  fedora            124 k


Transaction Summary
=============================================================================
Install      2 Package(s)         
Update       0 Package(s)         
Remove       0 Package(s)         


Total download size: 160 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): xinetd-2.3.14-18.fc9.i386.rpm                     | 124 kB     00:01     
(2/2): tftp-server-0.48-3.fc9.i386.rpm                   |  35 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing: xinetd                       ######################### [1/2] 
  Installing: tftp-server                  ######################### [2/2] 


Installed: tftp-server.i386 0:0.48-3.fc9
Dependency Installed: xinetd.i386 2:2.3.14-18.fc9
Complete!
[root@tom /]# yum install tcp_wrappers.i386 
Loaded plugins: refresh-packagekit
Setting up Install Process
Parsing package install arguments
Package tcp_wrappers-7.6-52.fc9.i386 already installed and latest version
Nothing to do
[root@tom /]# yum install curl.i386 
Loaded plugins: refresh-packagekit
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package curl.i386 0:7.18.1-1.fc9 set to be updated
--> Finished Dependency Resolution


Dependencies Resolved


=============================================================================
 Package                 Arch       Version          Repository        Size 
=============================================================================
Installing:
 curl                    i386       7.18.1-1.fc9     fedora            149 k


Transaction Summary
=============================================================================
Install      1 Package(s)         
Update       0 Package(s)         
Remove       0 Package(s)         


Total download size: 149 k
Is this ok [y/N]: y
Downloading Packages:
(1/1): curl-7.18.1-1.fc9.i386.rpm                        | 149 kB     00:01     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing: curl                         ######################### [1/1] 


Installed: curl.i386 0:7.18.1-1.fc9
Complete!
[root@tom /]# yum install bootparamd.i386 
Loaded plugins: refresh-packagekit
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package bootparamd.i386 0:0.17-27.fc9 set to be updated
--> Finished Dependency Resolution


Dependencies Resolved


=============================================================================
 Package                 Arch       Version          Repository        Size 
=============================================================================
Installing:
 bootparamd              i386       0.17-27.fc9      fedora             21 k


Transaction Summary
=============================================================================
Install      1 Package(s)         
Update       0 Package(s)         
Remove       0 Package(s)         


Total download size: 21 k
Is this ok [y/N]: y
Downloading Packages:
(1/1): bootparamd-0.17-27.fc9.i386.rpm                   |  21 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing: bootparamd                   ######################### [1/1] 


Installed: bootparamd.i386 0:0.17-27.fc9
Complete!
[root@tom /]# 

測試:
[root@tom /]# cd tftpboot/
[root@tom tftpboot]# ls
[root@tom tftpboot]# vi /etc/xinetd.
xinetd.conf  xinetd.d/    
[root@tom tftpboot]# vi /etc/xinetd.d/t
tcpmux-server  tftp           time-dgram     time-stream    
[root@tom tftpboot]# vi /etc/xinetd.d/tftp 
[root@tom tftpboot]# /etc/init.d/xinetd start
Starting xinetd:                                           [  OK  ]
[root@tom tftpboot]# /etc/init.d/xinetd restart
Stopping xinetd:                                           [  OK  ]
Starting xinetd:                                           [  OK  ]
[root@tom tftpboot]# netstat -a | grep tftp
udp        0      0 *:tftp                      *:*                                     

到此tftp啓動成功


[root@tom /]# cd home/
[root@tom home]# ls
apache  apache_1.3.36.tar.gz  apache-arm  fzf  smb
[root@tom home]# tftp 127.0.0.1
tftp> help
tftp-hpa 0.48
Commands may be abbreviated.  Commands are:


connect connect to remote tftp
mode     set file transfer mode
put     send file
get     receive file
quit     exit tftp
verbose toggle verbose mode
trace   toggle packet tracing
literal toggle literal mode, ignore ':' in file name
status   show current status
binary   set mode to octet
ascii   set mode to netascii
rexmt   set per-packet transmission timeout
timeout set total retransmission timeout
?       print help information
help     print help information
tftp> get test
tftp> q
[root@tom home]# ls
apache  apache_1.3.36.tar.gz  apache-arm  fzf  smb  test

//本機測試Tftp服務器成功

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章