dpkg --set-selections < packages-backup.list 后的问题

dpkg --set-selections < packages-backup.list 后的问题

我已经创建了在一个 ubuntu 服务器上安装的所有软件包的备份,并尝试将其恢复到新的 ubuntu 服务器。

我做了和这个问题的第一个答案

问题是运行最后两个命令sudo dpkg --set-selections < ~/Package.list&后sudo apt-get dselect-upgrade -y,我无法安装新软件包。

尝试安装时pip3出现此错误

Building dependency tree
Reading state information... Done
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:
 python3-pip : Depends: python3-setuptools 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
E: Unable to correct problems, you have held broken packages.

我发现的一个解决方案是sudo dpkg --configure -a

但是当运行命令时,这是我所得到的跟踪

[my:/home/my]$ sudo dpkg --configure -a
Setting up ppp (2.4.5-5.1ubuntu2.2) ...
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
insserv: Service gdm has to be enabled to start service pppd-dns
insserv: exiting now!
update-rc.d: error: insserv rejected the script header
dpkg: error processing package ppp (--configure):
 subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of pppconfig:
 pppconfig depends on ppp (>= 2.3.7); however:
  Package ppp is not configured yet.

dpkg: error processing package pppconfig (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of pppoeconf:
 pppoeconf depends on ppp (>= 2.4.2+20040428-2) | pppoe (>= 3.0); however:
  Package ppp is not configured yet.
  Package pppoe is not installed.
 pppoeconf depends on ppp (>= 2.4.1.uus2-4); however:
  Package ppp is not configured yet.

dpkg: error processing package pppoeconf (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 ppp
 pppconfig
 pppoeconf

我不知道下一步该做什么。

答案1

我会首先尝试删除pp。这似乎是导致您出现问题的原因。因此,请尝试:

sudo apt-get remove ppp

然后,尝试安装pip3您通常需要的其他任何内容。

相关内容