Reason for error, ssl_match_hostname not found
The online solution is: pip install –upgrade backports.ssl_match_hostname
It doesn’t actually work, it prompts that the module is already installed in /usr/local/lib/python2.7/dist-packages
root@kali~:#pip2 install –upgrade backports.ssl_match_hostname
Requirement already up-to-date:
backports.ssl_match_hostname in /usr/local/lib/python2.7/dist-packages (3.7.0.1)
Uninstalling and reinstalling docker-compose, emmmm, is also useless.
The final cause of the problem is:
**/usr/local/lib/python2.7/distpackages/docker/transport/ssladapter.py **
I can’t find the ssl_match_hostname module in the backports package under the package path.
In that case, let the script be able to find that module.
Final solution:
Method 1: Copy the module to the package path [Success].
#Go to the backports module path
cd /usr/local/lib/python2.7/dist-packages
#Copy the entire package to the transport package path
cp -r backports /usr/local/lib/python2.7/dist-packages/docker/transport
Problem 2
ImportError: No module named shutil_get_terminal_size
Solution
sudo apt install ipython
View version
sudo docker-compose version
Similar Posts:
- Docker-compose Run Error: Couldn’t connect to Docker daemon at http+docker://localhost – is it running?
- [Solved] Docker ERROR: Couldn’t connect to Docker daemon at http+docker://localunixsocket – is it running?
- Ubuntu20.04 server Error: Failed to restart docker.service: Unit docker.service not found
- [Solved] “/usr/local/bin/docker-compose: Permission denied”
- docker:ImportError: libcuda.so.1: cannot open shared object file: No such file or directory
- ImportError: No module named pytz
- [Solved] cannot kill Docker container – permission denied
- Error: unsupported locale setting