1.在docker容器中安装bash-completion
apt install bash-completion
在安装软件的时候出现了Package has no installation candidate的问题,如:
apt-get install
Reading package lists… Done
Building dependency tree… Done
Package aptitude is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package has no installation candidate
解决方法
# apt-get update
# apt-get upgrade
# apt-get install <packagename>
2.source一下
source /usr/share/bash-completion/bash_completion
解决 /bin/sh: 1: source: not found
解决办法:在命令行输入
exec bash
如下图: