-bash: docker-compose: command not found 解决方案

-bash: docker-compose: command not found

出现这个错误的原因是没有安装 docker-compose, 在centos 上,使用yum安装即可解决

[root@localhost ~]# yum -y install docker-compose
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.163.com
 * epel: hkg.mirror.rackspace.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
Resolving Dependencies
--> Running transaction check
---> Package docker-compose.noarch 0:1.18.0-4.el7 will be installed
--> Processing Dependency: python36-cached_property >= 1.2.0 for package: docker-compose-1.18.0-4.el7.noarch
--> Processing Dependency: python36-docker >= 2.6.1 for package: docker-compose-1.18.0-4.el7.noarch
--> Processing Dependency: python36-dockerpty >= 0.4.1 for package: docker-compose-1.18.0-4.el7.noarch
--> Processing Dependency: python36-docopt >= 0.6.1 for package: docker-compose-1.18.0-4.el7.noarch
--> Processing Dependency: python36-jsonschema >= 2.5.1 for package: docker-compose-1.18.0-4.el7.noarch
--> Processing Dependency: python36-pysocks >= 1.5.6 for package: docker-compose-1.18.0-4.el7.noarch
--> Processing Dependency: python36-requests >= 2.6.1 for package: docker-compose-1.18.0-4.el7.noarch
--> Processing Dependency: python36-six >= 1.3.0 for package: docker-compose-1.18.0-4.el7.noarch
--> Processing Dependency: python36-texttable >= 0.9.0 for package: docker-compose-1.18.0-4.el7.noarch
--> Processing Dependency: python36-websocket-client >= 0.32.0 for package: docker-compose-1.18.0-4.el7.noarch
--> Processing Dependency: python36-yaml >= 3.10 for package: docker-compose-1.18.0-4.el7.noarch
--> Running transaction check
---> Package python36-PyYAML.x86_64 0:3.12-1.el7 will be installed
--> Processing Dependency: libyaml-0.so.2()(64bit) for package: python36-PyYAML-3.12-1.el7.x86_64
---> Package python36-cached_property.noarch 0:1.5.1-2.el7 will be installed
---> Package python36-docker.noarch 0:2.6.1-3.el7 will be installed
--> Processing Dependency: python36-docker-pycreds >= 0.2.1 for package: python36-docker-2.6.1-3.el7.noarch
---> Package python36-dockerpty.noarch 0:0.4.1-10.el7 will be installed
---> Package python36-docopt.noarch 0:0.6.2-8.el7 will be installed
---> Package python36-jsonschema.noarch 0:2.5.1-4.el7 will be installed
---> Package python36-pysocks.noarch 0:1.6.8-6.el7 will be installed
---> Package python36-requests.noarch 0:2.14.2-1.el7 will be installed
--> Processing Dependency: python36-chardet for package: python36-requests-2.14.2-1.el7.noarch
--> Processing Dependency: python36-idna for package: python36-requests-2.14.2-1.el7.noarch
--> Processing Dependency: python36-urllib3 for package: python36-requests-2.14.2-1.el7.noarch
---> Package python36-six.noarch 0:1.11.0-3.el7 will be installed
---> Package python36-texttable.noarch 0:1.6.2-1.el7 will be installed
---> Package python36-websocket-client.noarch 0:0.47.0-2.el7 will be installed
--> Running transaction check
---> Package libyaml.x86_64 0:0.1.4-11.el7_0 will be installed
---> Package python36-chardet.noarch 0:3.0.4-1.el7 will be installed
---> Package python36-docker-pycreds.noarch 0:0.2.1-2.el7 will be installed
---> Package python36-idna.noarch 0:2.7-2.el7 will be installed
---> Package python36-urllib3.noarch 0:1.25.1-1.el7 will be installed
--> Processing Dependency: python36-rfc3986 for package: python36-urllib3-1.25.1-1.el7.noarch
--> Running transaction check
---> Package python36-rfc3986.noarch 0:1.3.0-1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================================================================================================================
 Package                                                       Arch                                       Version                                               Repository                                Size
===============================================================================================================================================================================================================
Installing:
 docker-compose                                                noarch                                     1.18.0-4.el7                                          epel                                     222 k
Installing for dependencies:
 libyaml                                                       x86_64                                     0.1.4-11.el7_0                                        base                                      55 k
 python36-PyYAML                                               x86_64                                     3.12-1.el7                                            epel                                     149 k
 python36-cached_property                                      noarch                                     1.5.1-2.el7                                           epel                                      18 k
 python36-chardet                                              noarch                                     3.0.4-1.el7                                           epel                                     190 k
 python36-docker                                               noarch                                     2.6.1-3.el7                                           epel                                     180 k
 python36-docker-pycreds                                       noarch                                     0.2.1-2.el7                                           epel                                      15 k
 python36-dockerpty                                            noarch                                     0.4.1-10.el7                                          epel                                      29 k
 python36-docopt                                               noarch                                     0.6.2-8.el7                                           epel                                      29 k
 python36-idna                                                 noarch                                     2.7-2.el7                                             epel                                      98 k
 python36-jsonschema                                           noarch                                     2.5.1-4.el7                                           epel                                      76 k
 python36-pysocks                                              noarch                                     1.6.8-6.el7                                           epel                                      30 k
 python36-requests                                             noarch                                     2.14.2-1.el7                                          epel                                     111 k
 python36-rfc3986                                              noarch                                     1.3.0-1.el7                                           epel                                      49 k
 python36-six                                                  noarch                                     1.11.0-3.el7                                          epel                                      33 k
 python36-texttable                                            noarch                                     1.6.2-1.el7                                           epel                                      23 k
 python36-urllib3                                              noarch                                     1.25.1-1.el7                                          epel                                     173 k
 python36-websocket-client                                     noarch                                     0.47.0-2.el7                                          epel                                      59 k

Transaction Summary
===============================================================================================================================================================================================================
Install  1 Package (+17 Dependent packages)

Total download size: 1.5 M
Installed size: 7.9 M
Downloading packages:
(1/18): libyaml-0.1.4-11.el7_0.x86_64.rpm                                                                                                                                               |  55 kB  00:00:00     
(2/18): python36-cached_property-1.5.1-2.el7.noarch.rpm                                                                                                                                 |  18 kB  00:00:00     
(3/18): python36-docker-pycreds-0.2.1-2.el7.noarch.rpm                                                                                                                                  |  15 kB  00:00:00     
(4/18): python36-PyYAML-3.12-1.el7.x86_64.rpm                                                                                                                                           | 149 kB  00:00:01     
(5/18): python36-dockerpty-0.4.1-10.el7.noarch.rpm                                                                                                                                      |  29 kB  00:00:00     
(6/18): python36-docopt-0.6.2-8.el7.noarch.rpm                                                                                                                                          |  29 kB  00:00:00     
(7/18): python36-jsonschema-2.5.1-4.el7.noarch.rpm                                                                                                                                      |  76 kB  00:00:00     
(8/18): python36-idna-2.7-2.el7.noarch.rpm                                                                                                                                              |  98 kB  00:00:00     
(9/18): python36-pysocks-1.6.8-6.el7.noarch.rpm                                                                                                                                         |  30 kB  00:00:00     
(10/18): python36-requests-2.14.2-1.el7.noarch.rpm                                                                                                                                      | 111 kB  00:00:00     
(11/18): python36-rfc3986-1.3.0-1.el7.noarch.rpm                                                                                                                                        |  49 kB  00:00:00     
(12/18): python36-six-1.11.0-3.el7.noarch.rpm                                                                                                                                           |  33 kB  00:00:00     
(13/18): python36-texttable-1.6.2-1.el7.noarch.rpm                                                                                                                                      |  23 kB  00:00:00     
(14/18): python36-websocket-client-0.47.0-2.el7.noarch.rpm                                                                                                                              |  59 kB  00:00:00     
(15/18): python36-urllib3-1.25.1-1.el7.noarch.rpm                                                                                                                                       | 173 kB  00:00:00     
(16/18): python36-chardet-3.0.4-1.el7.noarch.rpm                                                                                                                                        | 190 kB  00:00:22     
(17/18): docker-compose-1.18.0-4.el7.noarch.rpm                                                                                                                                         | 222 kB  00:00:32     
(18/18): python36-docker-2.6.1-3.el7.noarch.rpm                                                                                                                                         | 180 kB  00:00:49     
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                           31 kB/s | 1.5 MB  00:00:50     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : python36-six-1.11.0-3.el7.noarch                                                                                                                                                           1/18 
  Installing : python36-websocket-client-0.47.0-2.el7.noarch                                                                                                                                              2/18 
  Installing : python36-pysocks-1.6.8-6.el7.noarch                                                                                                                                                        3/18 
  Installing : python36-dockerpty-0.4.1-10.el7.noarch                                                                                                                                                     4/18 
  Installing : python36-docker-pycreds-0.2.1-2.el7.noarch                                                                                                                                                 5/18 
  Installing : python36-rfc3986-1.3.0-1.el7.noarch                                                                                                                                                        6/18 
  Installing : python36-urllib3-1.25.1-1.el7.noarch                                                                                                                                                       7/18 
  Installing : python36-chardet-3.0.4-1.el7.noarch                                                                                                                                                        8/18 
  Installing : python36-cached_property-1.5.1-2.el7.noarch                                                                                                                                                9/18 
  Installing : python36-docopt-0.6.2-8.el7.noarch                                                                                                                                                        10/18 
  Installing : python36-idna-2.7-2.el7.noarch                                                                                                                                                            11/18 
  Installing : python36-requests-2.14.2-1.el7.noarch                                                                                                                                                     12/18 
  Installing : python36-docker-2.6.1-3.el7.noarch                                                                                                                                                        13/18 
  Installing : python36-jsonschema-2.5.1-4.el7.noarch                                                                                                                                                    14/18 
  Installing : python36-texttable-1.6.2-1.el7.noarch                                                                                                                                                     15/18 
  Installing : libyaml-0.1.4-11.el7_0.x86_64                                                                                                                                                             16/18 
  Installing : python36-PyYAML-3.12-1.el7.x86_64                                                                                                                                                         17/18 
  Installing : docker-compose-1.18.0-4.el7.noarch                                                                                                                                                        18/18 
  Verifying  : libyaml-0.1.4-11.el7_0.x86_64                                                                                                                                                              1/18 
  Verifying  : python36-dockerpty-0.4.1-10.el7.noarch                                                                                                                                                     2/18 
  Verifying  : python36-texttable-1.6.2-1.el7.noarch                                                                                                                                                      3/18 
  Verifying  : python36-jsonschema-2.5.1-4.el7.noarch                                                                                                                                                     4/18 
  Verifying  : python36-docker-pycreds-0.2.1-2.el7.noarch                                                                                                                                                 5/18 
  Verifying  : python36-pysocks-1.6.8-6.el7.noarch                                                                                                                                                        6/18 
  Verifying  : python36-idna-2.7-2.el7.noarch                                                                                                                                                             7/18 
  Verifying  : python36-docker-2.6.1-3.el7.noarch                                                                                                                                                         8/18 
  Verifying  : python36-requests-2.14.2-1.el7.noarch                                                                                                                                                      9/18 
  Verifying  : docker-compose-1.18.0-4.el7.noarch                                                                                                                                                        10/18 
  Verifying  : python36-docopt-0.6.2-8.el7.noarch                                                                                                                                                        11/18 
  Verifying  : python36-cached_property-1.5.1-2.el7.noarch                                                                                                                                               12/18 
  Verifying  : python36-chardet-3.0.4-1.el7.noarch                                                                                                                                                       13/18 
  Verifying  : python36-urllib3-1.25.1-1.el7.noarch                                                                                                                                                      14/18 
  Verifying  : python36-six-1.11.0-3.el7.noarch                                                                                                                                                          15/18 
  Verifying  : python36-websocket-client-0.47.0-2.el7.noarch                                                                                                                                             16/18 
  Verifying  : python36-PyYAML-3.12-1.el7.x86_64                                                                                                                                                         17/18 
  Verifying  : python36-rfc3986-1.3.0-1.el7.noarch                                                                                                                                                       18/18 

Installed:
  docker-compose.noarch 0:1.18.0-4.el7                                                                                                                                                                         

Dependency Installed:
  libyaml.x86_64 0:0.1.4-11.el7_0                       python36-PyYAML.x86_64 0:3.12-1.el7                python36-cached_property.noarch 0:1.5.1-2.el7       python36-chardet.noarch 0:3.0.4-1.el7        
  python36-docker.noarch 0:2.6.1-3.el7                  python36-docker-pycreds.noarch 0:0.2.1-2.el7       python36-dockerpty.noarch 0:0.4.1-10.el7            python36-docopt.noarch 0:0.6.2-8.el7         
  python36-idna.noarch 0:2.7-2.el7                      python36-jsonschema.noarch 0:2.5.1-4.el7           python36-pysocks.noarch 0:1.6.8-6.el7               python36-requests.noarch 0:2.14.2-1.el7      
  python36-rfc3986.noarch 0:1.3.0-1.el7                 python36-six.noarch 0:1.11.0-3.el7                 python36-texttable.noarch 0:1.6.2-1.el7             python36-urllib3.noarch 0:1.25.1-1.el7       
  python36-websocket-client.noarch 0:0.47.0-2.el7      

Complete!

具体可参考官网文档:
Install Docker Compose

  • 6
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值