问题

基于镜像python:3.7启动容器,在里面执行以下命令:

apt-get install python3-dev

报错如下:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python3-dev 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-dev' has no installation candidate

 

解决办法

先执行:
apt-get update

再执行:
apt-get install python3-dev

如果执行apt-get update后不行,还可以尝试apt-get upgrade

 

 

 

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐