当我尝试在 vesktop 上使用带音频的屏幕共享时,应用程序出现一条错误,提示“您的 c++ 库太旧,无法运行 venmic”,这促使我尝试更新它。
我遵循以下步骤:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install --only-upgrade libstdc++6
之后我也立即通过软件管理器更新了我的 gcc。
从这些命令中删除的软件包是:
intel-media-va-driver:i386 libgl1:i386 libgl1-mesa-dri:i386
libglx-mesa0:i386 libglx0:i386 libicu70:i386 libigdgmm12:i386 libllvm15:i386
libnvidia-fbc1-535:i386 libstdc++6:i386 libva-glx2:i386 libxml2:i386
mesa-va-drivers:i386 mesa-vulkan-drivers:i386 steam:i386
steam-libs-i386:i386 va-driver-all:i386
我没怎么在意,因为它正在被其他库替换,遗憾的是我不记得是哪些库,尽管我没有注意到“nvidia-firmware”或“steam-devices”包。我还认为事后撤消此过程会很简单,所以我继续这样做。Vesktop 事后可以运行,但其他一些应用程序却无法运行,因此我尝试通过重新安装所有已删除的应用程序来撤消它,假设它会删除 libstdc++6 并将其替换为另一个。以下是发生的事情:
sudo apt install intel-media-va-driver:i386 libgl1:i386 libgl1-mesa-dri:i386
libglx-mesa0:i386 libglx0:i386 libicu70:i386 libigdgmm12:i386 libllvm15:i386
libnvidia-fbc1-535:i386 libstdc++6:i386 libva-glx2:i386 libxml2:i386
mesa-va-drivers:i386 mesa-vulkan-drivers:i386 steam:i386
steam-libs-i386:i386 va-driver-all:i386
Reading package lists... Done
Building dependency tree... Done
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:
intel-media-va-driver:i386 : Depends: libstdc++6:i386 (>= 11) but it is not going to be installed
libgl1-mesa-dri:i386 : Depends: libstdc++6:i386 (>= 11) but it is not going to be installed
Recommends: libgl1-amber-dri:i386 but it is not installable
libicu70:i386 : Depends: libstdc++6:i386 (>= 5.2) but it is not going to be installed
libigdgmm12:i386 : Depends: libstdc++6:i386 (>= 4.1.1) but it is not going to be installed
libllvm15:i386 : Depends: libstdc++6:i386 (>= 12) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
libglx-mesa0:i386: command not found
libnvidia-fbc1-535:i386: command not found
mesa-va-drivers:i386: command not found
steam-libs-i386:i386: command not found
我尝试删除 libstdc++6 包,看看它是否会被其他包替换,结果得到了这个:
sudo apt-get remove libstdc++6
Reading package lists... Done
Building dependency tree... Done
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:
apt : Depends: libapt-pkg6.0 (>= 2.4.12) but it is not going to be installed
Depends: libstdc++6 (>= 11) but it is not going to be installed
mintsources : Depends: python3-apt but it is not going to be installed
Depends: python3-gi but it is not going to be installed
Depends: python3-gi-cairo but it is not going to be installed
Depends: python3-pycurl but it is not going to be installed
Depends: python3-requests but it is not going to be installed
Depends: mint-common (>= 2) but it is not going to be installed
Depends: gir1.2-gdkpixbuf-2.0 but it is not going to be installed
Depends: gir1.2-gtk-3.0 but it is not going to be installed
Depends: gir1.2-vte-2.91 but it is not going to be installed
Depends: gir1.2-xapp-1.0 but it is not going to be installed
Depends: lsb-release but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
我尝试安装 libstdc++6:i386,但发生了以下情况:
sudo apt install libstdc++6:i386
Reading package lists... Done
Building dependency tree... Done
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:
apt : Depends: libapt-pkg6.0 (>= 2.4.12) but it is not going to be installed
Depends: libstdc++6 (>= 11) but it is not installable
mintsources : Depends: python3-apt but it is not going to be installed
Depends: python3-gi but it is not going to be installed
Depends: python3-gi-cairo but it is not going to be installed
Depends: python3-pycurl but it is not going to be installed
Depends: python3-requests but it is not going to be installed
Depends: mint-common (>= 2) but it is not going to be installed
Depends: gir1.2-gdkpixbuf-2.0 but it is not going to be installed
Depends: gir1.2-gtk-3.0 but it is not going to be installed
Depends: gir1.2-vte-2.91 but it is not going to be installed
Depends: gir1.2-xapp-1.0 but it is not going to be installed
Depends: lsb-release but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
我尝试修复损坏的软件包并得到以下结果:
sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
i965-va-driver:i386 libatomic1:i386 libbrotli1:i386 libdrm-amdgpu1:i386
libdrm-intel1:i386 libdrm-nouveau2:i386 libdrm-radeon1:i386 libedit2:i386
libelf1:i386 libfontconfig1:i386 libfreetype6:i386 libglib2.0-0:i386
libgnutls30:i386 libhogweed6:i386 libnettle8:i386 libnm0:i386
libp11-kit0:i386 libpciaccess0:i386 libpng16-16:i386 libsensors5:i386
libtasn1-6:i386 libva-drm2:i386 libva-x11-2:i386 libva2:i386 libvulkan1:i386
libxcb-glx0:i386 libxcb-shm0:i386 libxfixes3:i386 libxi6:i386
libxinerama1:i386 libxss1:i386 libxxf86vm1:i386
nvidia-firmware-535-535.171.04 steam-devices
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 12 not upgraded.
然后我注意到 Steam 从我的应用程序中消失了,当我尝试再次安装它时,我也遇到了一个错误:
The following packages have unmet dependencies:
apt: Depends: libapt-pkg6.0 (>= 2.4.12) but it is not going to be installed
Depends: libstdc++6 (>= 11) but it is not installable
mintsources: Depends: python3-apt but it is not going to be installed
Depends: python3-gi but it is not going to be installed
Depends: python3-gi-cairo but it is not going to be installed
Depends: python3-pycurl but it is not going to be installed
Depends: python3-requests but it is not going to be installed
Depends: mint-common (>= 2) but it is not going to be installed
Depends: gir1.2-gdkpixbuf-2.0 but it is not going to be installed
Depends: gir1.2-gtk-3.0 but it is not going to be installed
Depends: gir1.2-vte-2.91 but it is not going to be installed
Depends: gir1.2-xapp-1.0 but it is not going to be installed
Depends: lsb-release but it is not going to be installed
那么发生了什么,我该怎么办?我以前从未遇到过这个问题,而且我以前也使用过外部存储库。autoremove
由于担心会进一步破坏系统,我没有运行该命令,但似乎这些软件包是导致问题的原因。我正在运行 Linux Mint 21.1,我不确定哪个 c++ 库适合这个系统,我只是想让一切恢复原样。
libstdc++6 和 libstdc++6:i386 的 apt 策略命令:
apt policy libstdc++6 libstdc++6:i386
libstdc++6:
Installed: 13.1.0-8ubuntu1~22.04
Candidate: 13.1.0-8ubuntu1~22.04
Version table:
*** 13.1.0-8ubuntu1~22.04 100
100 /var/lib/dpkg/status
12.3.0-1ubuntu1~22.04 500
500 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages
12-20220319-1ubuntu1 500
500 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages
libstdc++6:i386:
Installed: (none)
Candidate: 12.3.0-1ubuntu1~22.04
Version table:
12.3.0-1ubuntu1~22.04 500
500 http://archive.ubuntu.com/ubuntu jammy-updates/main i386 Packages
500 http://security.ubuntu.com/ubuntu jammy-security/main i386 Packages
12-20220319-1ubuntu1 500
500 http://archive.ubuntu.com/ubuntu jammy/main i386 Packages