After installing docker-compose, there is a syntax error nearby, how to deal with it

1. Environment description: My system is ubuntu20.0.4. After installing the docker-compose method on the official website, a 404 appears and there are grammatical errors nearby.

2. Explanation of the cause of the abnormality: When installing online through the official address below, the file is incomplete after the official curl download, resulting in an abnormality;

The online address is as follows:

curl -L https://get.daocloud.io/docker/compose/releases/download/1.26.2/docker-compose-'uname -s'-'uname -m' > /usr/local/bin/docker-compose

3. Solution: Manually download the complete package --> copy it to the /usr/local/bin/ directory --> rename --> grant permissions --> complete. The program has been tested and passed by yourself, please rest assured to deploy.

4. The solution steps are as follows:

1. Enter the following address and download the version:

docker-compose-Linux-x86_64

2. Copy to the /usr/local/bin/ directory, the command is as follows:

cp 文件路径/docker-compose-Linux-x86_64 /usr/local/bin/docker-compose-Linux-x86_64

3. Use the following command to rename the file, the command is as follows:

mv docker-compose-Linux-x86_64 /usr/local/bin/docker-compose

4. Grant permissions, the command is as follows:

chmod +x /usr/local/bin/docker-compose

5. Verify whether the installation is successful, the command is as follows:

docker-compose -v

 

Guess you like

Origin blog.csdn.net/joyksk/article/details/112996662