CentOS执行ftp命令提示ftp:command not found解决方法
在使用centos时, 要用ftp上传文件, 但是一到脚本的ftp命令就会出错:
复制代码
代码如下:
ftp: command not found
原因是否ftp客户端没有安装上, 要重新安装一下就可以了.
解决方法,去官方进入 http://mirror.centos.org/centos/5/os/i386/CentOS/ 找到ftp的rpm package的地址然后执行安装.
ftp: command not found
原因是否ftp客户端没有安装上, 要重新安装一下就可以了.
解决方法,去官方进入 http://mirror.centos.org/centos/5/os/i386/CentOS/ 找到ftp的rpm package的地址然后执行安装.
5.x版本的执行:
复制代码
代码如下:
rpm -Uvh http://mirror.centos.org/centos/5/os/i386/CentOS/ftp-0.17-35.el5.i386.rpm
rpm -Uvh http://mirror.centos.org/centos/5/os/i386/CentOS/ftp-0.17-35.el5.i386.rpm
6.x版本的执行:
32位:
复制代码
代码如下:
rpm -Uvh http://mirror.centos.org/centos/6/os/i386/Packages/ftp-0.17-54.el6.i686.rpm
rpm -Uvh http://mirror.centos.org/centos/6/os/i386/Packages/ftp-0.17-54.el6.i686.rpm
64位:
复制代码
代码如下:
rpm -Uvh http://mirror.centos.org/centos/6/os/x86_64/Packages/ftp-0.17-54.el6.x86_64.rpm
rpm -Uvh http://mirror.centos.org/centos/6/os/x86_64/Packages/ftp-0.17-54.el6.x86_64.rpm
安装成功ftp命令就可以用了.
补充更新:如果执行上面命令后提示以下错误信息:
复制代码
代码如下:
libc.so.6 is needed by ftp-0.17-35.el5.i386
则可以通过命令安装依赖包glibc
libc.so.6 is needed by ftp-0.17-35.el5.i386
则可以通过命令安装依赖包glibc
复制代码
代码如下:
rpm –Uvh http://mirror.centos.org/centos/6/os/x86_64/Packages/glibc-2.12-1.132.el6.x86_64.rpm
rpm –Uvh http://mirror.centos.org/centos/6/os/x86_64/Packages/glibc-2.12-1.132.el6.x86_64.rpm