How do I un-corrupt a command reference in bash?
On a CentOS 7 server, I am installing Docker and Docker Machine. The installation has required some manual re-setting of BIOS options and then rebooting the operating system during the installation process. At first, the docker-machine command was found by bash. But it seems that some of bash's references have been broken during the reboots. As a result, the commands below for installing Docker Machine and checking its version now result in a failure message, even when I repeatedly run the install command below.
I am following the instructions for setting up Docker Machine at this link.
Here is the terminal output after the final reboot:
[root@localhost ~]# base=https://github.com/docker/machine/releases/download/v0.14.0 &&
> curl -L $base/docker-machine-$(uname -s)-$(uname -m) >/tmp/docker-machine &&
> sudo install /tmp/docker-machine /usr/local/bin/docker-machine
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 617 0 617 0 0 836 0 --:--:-- --:--:-- --:--:-- 836
100 26.7M 100 26.7M 0 0 3481k 0 0:00:07 0:00:07 --:--:-- 5962k
[root@localhost ~]# docker-machine version
-bash: docker-machine: command not found
[root@localhost ~]#
Is there some command that I can use to clean all of bash's references so that a clean install can either throw a meaningful error, or hopefully work? Or are there some diagnostic commands that someone can suggest?
I am hoping for a more graceful solution than resorting to re-installing the host operating system and reprovisioning everything in the machine from scratch.
User suggestions:
Per @MichaelHomer's suggestion, I tried the following:
[root@localhost ~]# PATH=/usr/local/bin:$PATH
[root@localhost ~]#
Per @roaima's suggestion, I tried:
[root@localhost ~]# hash -r
[root@localhost ~]# ls -ld /usr/local/bin/docker-machine
-rwxr-xr-x. 1 root root 28034848 Apr 16 16:18 /usr/local/bin/docker-machine
[root@localhost ~]# echo "$PATH"
/usr/local/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-1.b12.el7_4.x86_64/bin:/root/bin
[root@localhost ~]#
Per @arcsin's suggestion, I typed:
[root@localhost ~]# file /usr/local/bin/docker-machine
/usr/local/bin/docker-machine: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped
[root@localhost ~]# /usr/local/bin/docker-machine version
docker-machine version 0.14.0, build 89b8332
[root@localhost ~]#