windows10 ubuntu 18.0 子系统安装docker

本文记录了一次Docker安装过程中的问题解决经历。作者遵循官方指南安装时遇到安装候选缺失的问题,通过修改源列表解决了该问题。

今天按照docker官网“Install using the repository”向导一步步操作,最后到了“sudo apt-get install docker-ce”怎么都进行不下去,提示“E: Package 'docker-ce' has no installation candidate”。怀疑自己可能中间步骤有遗漏,就有仔细的走了一遍向导操作,还是同样错误。

本来想搜google,可惜没翻出去,工具失效了……那就用bing吧,最后终于找到解决办法,现与学友分享之:

修改:“/etc/apt/sources.list”文件的“deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable”这一行为“deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial bionic stable”,重点就是加入“xenial”repository,保存退出。

再次执行:

$ sudo apt-get update

$ sudo apt-get install docker-ce

大功告成,测试下:




版权所有 (C) Microsoft Corporation。保留所有权利。 尝试新的跨平台 PowerShell https://aka.ms/pscore6 (.venv1) PS D:\PythonProject> buildozer -v android debug # Check configuration tokens Unknown command/target android (.venv1) PS D:\PythonProject> pip show buildozer Name: buildozer Version: 1.5.0 Summary: Generic Python packager for Android / iOS and Desktop Home-page: https://github.com/kivy/buildozer Author-email: mat@kivy.org License: MIT Location: d:\pythonproject\.venv1\lib\site-packages Requires: pexpect, sh, virtualenv Required-by: (.venv1) PS D:\PythonProject> pip show python-for-android Name: python-for-android Version: 2024.1.21 Summary: A development tool that packages Python apps into binaries that can run on Android devices. Home-page: https://github.com/kivy/python-for-android Author: Kivy Team and other contributors Author-email: kivy-dev@googlegroups.com License: MIT Location: d:\pythonproject\.venv1\lib\site-packages Requires: appdirs, build, colorama, jinja2, packaging, setuptools, toml Required-by: (.venv1) PS D:\PythonProject> wsl 适用于 LinuxWindows 子系统现已在 Microsoft Store 中可用! 你可以通过运行“wsl.exe --update”或通过访问 https://aka.ms/wslstorepage 进行升级 从 Microsoft Store 安装 WSL 将可以更快地获取最新的 WSL 更新。 有关详细信息,请访问 https://aka.ms/wslstoreinfo Welcome to Ubuntu 24.04.2 LTS (GNU/Linux 4.4.0-19041-Microsoft x86_64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/pro System information as of Tue Sep 2 14:07:45 CST 2025 System load: 0.52 Processes: 8 Usage of /home: unknown Users logged in: 0 Memory usage: 69% IPv4 address for wifi0: 11.1.1.211 Swap usage: 3% This message is shown once a day. To disable it please create the /home/aac414/.hushlogin file. aac414@DESKTOP-AORSPFA:/mnt/d/PythonProject$ sudo apt update sudo apt install -y python3-pip python3-setuptools git pip3 install buildozer python-for-android [sudo] password for aac414: Hit:1 http://archive.ubuntu.com/ubuntu noble InRelease Get:2 http://archive.ubuntu.com/ubuntu noble-updates InRelease [126 kB] Get:3 http://security.ubuntu.com/ubuntu noble-security InRelease [126 kB] Get:4 http://archive.ubuntu.com/ubuntu noble-backports InRelease [126 kB] Get:5 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages [1385 kB] Get:6 http://security.ubuntu.com/ubuntu noble-security/main amd64 Packages [1106 kB] Get:7 http://archive.ubuntu.com/ubuntu noble-updates/main Translation-en [273 kB] Get:8 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 Components [175 kB] Get:9 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 c-n-f Metadata [14.9 kB] Get:10 http://archive.ubuntu.com/ubuntu noble-updates/universe amd64 Packages [1471 kB] Get:11 http://archive.ubuntu.com/ubuntu noble-updates/universe Translation-en [297 kB] Get:12 http://archive.ubuntu.com/ubuntu noble-updates/universe amd64 Components [377 kB] Get:13 http://archive.ubuntu.com/ubuntu noble-updates/universe amd64 c-n-f Metadata [30.5 kB] Get:14 http://archive.ubuntu.com/ubuntu noble-updates/restricted amd64 Packages [1785 kB] Get:15 http://archive.ubuntu.com/ubuntu noble-updates/restricted Translation-en [399 kB] Get:16 http://archive.ubuntu.com/ubuntu noble-updates/restricted amd64 Components [212 B] Get:17 http://archive.ubuntu.com/ubuntu noble-updates/multiverse amd64 Components [940 B] Get:18 http://archive.ubuntu.com/ubuntu noble-backports/main amd64 Components [7084 B] Get:19 http://archive.ubuntu.com/ubuntu noble-backports/universe amd64 Packages [30.2 kB] Get:20 http://archive.ubuntu.com/ubuntu noble-backports/universe Translation-en [17.4 kB] Get:21 http://archive.ubuntu.com/ubuntu noble-backports/universe amd64 Components [19.2 kB] Get:22 http://archive.ubuntu.com/ubuntu noble-backports/restricted amd64 Components [216 B] Get:23 http://archive.ubuntu.com/ubuntu noble-backports/multiverse amd64 Components [212 B] Get:24 http://security.ubuntu.com/ubuntu noble-security/main Translation-en [190 kB] Get:25 http://security.ubuntu.com/ubuntu noble-security/main amd64 Components [21.6 kB] Get:26 http://security.ubuntu.com/ubuntu noble-security/main amd64 c-n-f Metadata [8708 B] Get:27 http://security.ubuntu.com/ubuntu noble-security/universe amd64 Packages [881 kB] Get:28 http://security.ubuntu.com/ubuntu noble-security/universe Translation-en [195 kB] Get:29 http://security.ubuntu.com/ubuntu noble-security/universe amd64 Components [52.3 kB] Get:30 http://security.ubuntu.com/ubuntu noble-security/universe amd64 c-n-f Metadata [18.0 kB] Get:31 http://security.ubuntu.com/ubuntu noble-security/restricted amd64 Packages [1685 kB] Get:32 http://security.ubuntu.com/ubuntu noble-security/restricted Translation-en [377 kB] Get:33 http://security.ubuntu.com/ubuntu noble-security/restricted amd64 Components [212 B] Get:34 http://security.ubuntu.com/ubuntu noble-security/multiverse amd64 Components [212 B] Fetched 11.2 MB in 7s (1703 kB/s) Reading package lists... Done Building dependency tree... Done Reading state information... Done 159 packages can be upgraded. Run 'apt list --upgradable' to see them. Reading package lists... Done Building dependency tree... Done Reading state information... Done You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: python3-pip : Depends: python3-wheel but it is not going to be installed Recommends: build-essential but it is not going to be installed Recommends: python3-dev (>= 3.2) but it is not going to be installed python3-setuptools : Depends: python3-pkg-resources (= 68.1.2-2ubuntu1.2) but 68.1.2-2ubuntu1.1 is to be installed systemd-sysv : Depends: systemd (= 255.4-1ubuntu8.4) but 255.4-1ubuntu8.10 is to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). Command 'pip3' not found, but can be installed with: sudo apt install python3-pip aac414@DESKTOP-AORSPFA:/mnt/d/PythonProject$ cd /mnt/d/PythonProject buildozer init buildozer: command not found aac414@DESKTOP-AORSPFA:/mnt/d/PythonProject$ 好像报错了吗?
09-03
评论 5
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值