我已经创建了我在一台 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
我不确定下一步该怎么做。
我会先尝试删除
pp
. 这似乎是导致您的问题的原因。所以,试试:然后,尝试安装
pip3
和其他您通常需要的东西。