我想我在这里犯了一个非常天真的错误:
$ which docker-compose
/usr/local/bin/docker-compose
$ /usr/local/bin/docker-compose version
Docker Compose version v2.24.0-birthday.10
$ docker-compose
-bash: /usr/bin/docker-compose: No such file or directory
$ echo $PATH
/home/ubuntu/.local/bin:/home/ubuntu/bin:/opt/apache-maven-3.6.3/bin:/opt/polaris:/opt/gradle/gradle-8.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/ubuntu/ws/Go-WS/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:
$ type docker-compose
docker-compose is hashed (/usr/local/bin/docker-compose)
$ cat /usr/bin/docker-compose
cat: /usr/bin/docker-compose: No such file or directory
字符串
重启示例后,这种奇怪的现象就消失了。
我的路有什么不好?
1条答案
按热度按时间mbjcgjjk1#
正如John所说,你的$PATH没有问题,但更多的是symlink.xml,并重新安装docker-compose,看看是否修复了它