首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Windows 10上WSL上安装Turi的问题

Windows 10上WSL上安装Turi的问题
EN

Stack Overflow用户
提问于 2022-08-14 14:12:38
回答 1查看 60关注 0票数 0

我已经在WSL上为Turi安装了Ubuntu,但是当我开始时:

代码语言:javascript
复制
sudo apt install python3-pip

..。我知道错误:

代码语言:javascript
复制
Package python3-pip 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"

我该怎么解决这个问题?

EN

回答 1

Stack Overflow用户

发布于 2022-08-14 15:42:23

简短答覆:

代码语言:javascript
复制
sudo apt update

那就安装。

更多解释:

如果您试图在WSL上安装Ubuntu之后立即安装任何软件包,您将看到以下内容:

代码语言:javascript
复制
Package <package_name> 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

和/或:

代码语言:javascript
复制
E: Package '<package_name>' has no installation candidate

这是因为apt缓存尚未填充。为了节省在WSL上下载和安装Ubuntu时的带宽,默认情况下不填充包列表。在WSL上基于apt的发行版上需要一个初始sudo apt update

但是作为一般规则,在安装任何基于Debian的发行版之后,建议首先使用sudo apt update。否则,您可能会收到安装错误,因为缓存中的包和URL经常更改。

示例-来自WSL上的新Ubuntu安装:

代码语言:javascript
复制
> sudo apt install python3-pip
[sudo] password for ntd:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python3-pip 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 'python3-pip' has no installation candidate

> sudo apt update && sudo apt upgrade -y

... output trimmed

> sudo apt install python3-pip

... installs as expected
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73352338

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档