基本上,当我试图升级我的ubuntu时,我收到了这样的错误:
christian@christian-HP-EliteBook-840-G3:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
gnome-control-center gnome-control-center-data gnome-remote-desktop gnome-settings-daemon gnome-settings-daemon-common gnome-shell
gnome-shell-common gvfs gvfs-backends gvfs-common gvfs-daemons gvfs-fuse gvfs-libs libayatana-appindicator3-1 libinput-bin libinput10
libnss-systemd libpam-systemd librygel-renderer-2.6-2 librygel-server-2.6-2 libsemanage-common libsystemd0 libsystemd0:i386 libudev1 libwacom-bin
libwacom-common mutter node-ajv node-constants-browserify node-debbundle-acorn node-errno node-json5 node-mkdirp node-sha.js node-which node-yargs
node-yargs-parser ntfs-3g passwd rygel sssd-common sssd-krb5 sssd-krb5-common sssd-proxy systemd systemd-sysv systemd-timesyncd ubuntu-desktop
ubuntu-desktop-minimal udev usb-creator-common usb-creator-gtk xdg-desktop-portal xdg-desktop-portal-gtk xserver-xorg-input-libinput
yaru-theme-gnome-shell
0 upgraded, 0 newly installed, 0 to remove and 56 not upgraded.因此,当我运行sudo apt-get dist-upgrade时,我会收到这样的消息:
christian@christian-HP-EliteBook-840-G3:~$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Error!
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:
node-yargs-parser : Breaks: node-yargs (< 16.2.0~) but 15.3.1+repack-2 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.我怎样才能解决这个问题?我用的是ubuntu 22.04
编辑:apt policy node-yargs-parser输出:
christian@christian-HP-EliteBook-840-G3:~$ sudo apt policy node-yargs-parser
[sudo] password for christian:
node-yargs-parser:
Installed: 18.1.3+~15.0.0-1
Candidate: 21.0.0+~20.2.1-3
Version table:
21.0.0+~20.2.1-3 500
500 http://rw.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
500 http://rw.archive.ubuntu.com/ubuntu jammy/universe i386 Packages *** 18.1.3+~15.0.0-1 100
100 /var/lib/dpkg/status christian@christian-HP-EliteBook-840-G3:~$ 发布于 2022-09-27 11:38:20
在这种情况下,重新安装正确版本的node-yargs-parser应该可以解决这个问题。运行:
sudo apt install --reinstall node-yargs-parserhttps://askubuntu.com/questions/1432509
复制相似问题