尝试更新 Node 版本:以下软件包具有未满足的依赖项:mongodb-org

尝试更新 Node 版本:以下软件包具有未满足的依赖项:mongodb-org

这是我的 Dockerfile,它运行没有问题:

FROM node:12 as build

# Install mongo in container for mongodump command
RUN wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | apt-key add -
RUN echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/5.0 main" | tee /etc/apt/sources.list.d/mongodb-org-5.0.list
RUN apt-get update
RUN apt-get install -y mongodb-org

但是,当我尝试将 Node 版本更新到 16(FROM node:16 as build)时,出现以下错误:

Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
mongodb-org : Depends: mongodb-org-database but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

如何更新节点版本而不会出现这些问题?它运行在 Azure 应用服务、Linux 操作系统上。每次部署时我都会运行它。

相关内容