大佬想问下 docker-compose安装 在Python虚拟环境里的 配置了软链接 但是使用一直报找不到命令
网上还试过 我天呢 弄了一下午 , 好像因为python2是默认的
出现的各种奇怪 报错 non-zero exit status 1.
[Bash shell] 纯文本查看 复制代码 安装 pip :
yum -y install epel-release
yum -y install python-pip
#升级
pip install --upgrade pip
2) 安装Docker-Compose:
pip3 install --upgrade pip
pip install docker-compose
python3 -m pip install docker-compose
网上也试过
curl -L https://get.daocloud.io/docker/compose/releases/download/1.25.4/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
这些都不行
后来在虚拟机里装上了 也配置了软链接 还是找不到 。。。。我的妈耶 也太艰难 了吧 (已经凌乱)
查看软链接
[root@ywbd-app1 bin]# ls -l /usr/bin/ | grep '^l'
lrwxrwxrwx 1 root root 29 May 17 17:26 docker-compose2 -> /usr/local/bin/docker-compose
我又卸载了重装
pip3 install --upgrade --force-reinstall --no-cache-dir docker-compose && ln -sf /usr/local/bin/docker-compose /usr/bin/docker-compose
结果 又报这个错。。。WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
求救~~~
|