I can’t use the command ftp

ftpyum

When I try to install ftp:

$ sudo yum install ftp
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Setting up Install Process
No package ftp available.
Error: Nothing to do

When I try to connect to my ftp:

$ ftp 10.2.4.202
-bash: ftp: command not found

Searching for ftp via yum:

$ sudo yum search ftp
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
====================================================================== N/S Matched: ftp ======================================================================
curl.x86_64 : A utility for getting files from remote servers (FTP, HTTP, and others)
wget.x86_64 : A utility for retrieving files using the HTTP or FTP protocols

  Name and summary matches only, use "search all" for everything.

Trying the recommended following: yum install lftp, list *ftp*, install ncftp (same results):

$ sudo yum install lftp
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Setting up Install Process
No package lftp available.
Error: Nothing to do

Trying lftp:

$ lftp 10.2.4.202
-bash: lftp: command not found

Output of yum repolist:

$ sudo yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
repo id                repo name                         status
CactiEZ                CactiUsers Cactiez Repo           30
pgdg93                 PostgreSQL 9.3 6 - x86_64         195
repolist: 225

Best Answer

The output of this command sequence:

$ sudo yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
repo id                repo name                         status
CactiEZ                CactiUsers Cactiez Repo           30
pgdg93                 PostgreSQL 9.3 6 - x86_64         195
repolist: 225

Would seem to indicate that your YUM installation and repositories is severely damaged. To debug this further I'd need to see what repository files you actually do have in your /etc/yum.repos.d directory.

The standard YUM repository .repo files should be owned by a package called centos-release-*. You can confirm like so:

$ rpm -qf /etc/yum.repos.d/CentOS-Base.repo

If this directory has been damaged, you could manually re-add these files or re-install using the appropriate CentOS .rpm file.

Related Question