这是我的电脑配置。pegasus@pegasus:~$ uname -aLinux pegasus 6.8.0-36-generic #36-Ubuntu SMP PREEMPT_DYNAMIC Mon Jun 10 10:49:14 UTC 2024 x86_64 x86_64 x86_64 GNU/Linuxpegasus@pegasus:~$ cat /e...
这是我的电脑配置。
pegasus@pegasus:~$ uname -a
Linux pegasus 6.8.0-36-generic #36-Ubuntu SMP PREEMPT_DYNAMIC Mon Jun 10 10:49:14 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
pegasus@pegasus:~$ cat /etc/os-release
PRETTY_NAME="Ubuntu 24.04 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo
我已经按照此处所述的方式设置了我的 docker。 守护进程的错误响应:获取 \'https://registry-1.docker.io/v2/\':proxyconnect tcp:dial tcp:lookup proxy.example.com on 8.8.8.8:53:没有这样的主机
但是目前执行 sudo apt upgrade 之后,我面临的问题是即使在拉取之后也无法运行大多数 docker 镜像。
pegasus@pegasus:~$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu 22.04 8a3cdc4d1ad3 9 days ago 77.9MB
hello-world latest d2c94e258dcb 14 months ago 13.3kB
pegasus@pegasus:~$ docker run ubuntu:22.04
pegasus@pegasus:~$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
pegasus@pegasus:~$ systemctl status docker
docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; preset: enabled)
Active: active (running) since Sun 2024-07-07 10:40:21 +06; 7min ago
TriggeredBy: docker.socket
Docs: https://docs.docker.com
Main PID: 3589 (dockerd)
Tasks: 16
Memory: 112.9M (peak: 115.2M)
CPU: 695ms
CGroup: /system.slice/docker.service
3589 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
জুলাই 07 10:40:20 pegasus systemd[1]: Starting docker.service - Docker Application Container Engine...
জুলাই 07 10:40:20 pegasus dockerd[3589]: time="2024-07-07T10:40:20.790924612+06:00" level=info msg="Starting up"
জুলাই 07 10:40:20 pegasus dockerd[3589]: time="2024-07-07T10:40:20.873556063+06:00" level=info msg="[graphdriver] using prior storage driver: overlay2"
জুলাই 07 10:40:20 pegasus dockerd[3589]: time="2024-07-07T10:40:20.875291689+06:00" level=info msg="Loading containers: start."
জুলাই 07 10:40:21 pegasus dockerd[3589]: time="2024-07-07T10:40:21.049643248+06:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip>
জুলাই 07 10:40:21 pegasus dockerd[3589]: time="2024-07-07T10:40:21.139310021+06:00" level=info msg="Loading containers: done."
জুলাই 07 10:40:21 pegasus dockerd[3589]: time="2024-07-07T10:40:21.159863331+06:00" level=info msg="Docker daemon" commit=c8af8eb containerd-snapshotter=false storage-driver=overlay2 version>
জুলাই 07 10:40:21 pegasus dockerd[3589]: time="2024-07-07T10:40:21.160313458+06:00" level=info msg="Daemon has completed initialization"
জুলাই 07 10:40:21 pegasus dockerd[3589]: time="2024-07-07T10:40:21.216982812+06:00" level=info msg="API listen on /run/docker.sock"
জুলাই 07 10:40:21 pegasus systemd[1]: Started docker.service - Docker Application Container Engine.
我该如何修复它?
我在 python 下安装了这些版本的 python:1.update-alternatives --list python /usr/bin/python3 /usr/bin/python3.11 /usr/bin/python3.12 /usr/bin/python3.8 /usr/bin/python3.9
我在python下安装了这些版本的python:
1.
update-alternatives --list python
/usr/bin/python3
/usr/bin/python3.11
/usr/bin/python3.12
/usr/bin/python3.8
/usr/bin/python3.9
update-alternatives --list python3
/usr/bin/python3.10
/usr/bin/python3.12
/usr/bin/python3.8
当我将 python 版本从 python3 更改为 python3.12(3.8 以外的任何版本)时,终端似乎不起作用。我无法打开终端。
因此我使用 打开虚拟终端 ctrl+atl+F3
,并使用以下命令将 python 版本更改回 3.8:
update-alternatives –config python3
并选择 python3.8 - 然后终端再次开始工作
为什么终端附加到 python3.8?我可能必须使用 python 的其他版本。
当我将 python 版本更改为 python 时,它不会引发任何问题。只有 python3
有对 Ubuntu 和 Python 有深入了解的人可以指导我吗?