执行:yum repolist时报错:
Loaded plugins: fastestmirror, refresh-packagekit, security
Determining fastest mirrorsftp://172.24.240.160/pub/repodata/repomd.xml: [Errno 14] PYCURL ERROR 7 - "couldn't connect to host"
Trying other mirror.
或者执行 Yum install *命令时报错:
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
ftp://172.24.240.160/pub/repodata/repomd.xml: [Errno 14] PYCURL ERROR 7 - "couldn't connect to host"
Trying other mirror.
原因:有可能ftp服务没有启动。
解决办法:启动FTP服务,并且将此服务设置为开机自启模式即可。具体命令如下:
- 查看FTP服务是否运行中:service vsftpd status
- 查看本地是否含有包含ftp的进程开启:ps -ef | grep ftp
- FTP设置开机自动运行:chkconfig vsftpd on
- 关闭FTP开机自动运行:chkconfig vsftpd off
- 查看所有服务开启自动运行的情况:chkconfig --list
- 启动FTP服务:service vsftpd start
- 停止FTP服务:service vsftpd stop
- 重启FTP服务:service vsftpd restart