You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

升级Ubuntu 22.04LTS后图形渲染类应用故障及软件包依赖问题求助

升级Ubuntu 22.04LTS后图形渲染类应用故障及软件包依赖问题求助

我之前用的是Ubuntu 20.04LTS,当时已经开始出现依赖错误,于是我升级到了22.04LTS——升级过程显示完成,但有2-3个警告。现在遇到了两个棘手的问题:

一、图形渲染类应用故障

  • Chrome、VLC、nomacs这些应用打开后窗口是黑色的,还会逐渐出现更多屏幕损坏的情况
  • nomacs直接弹出提示:unable to create a GL context
  • 但Thunderbird、LibreOffice、文本编辑器、文件管理器、扫描仪这些应用都能正常工作

二、软件包依赖与安装问题

下面是我尝试解决问题时执行的命令及对应输出:

1. 执行sudo apt update

Hit:1 http://gb.archive.ubuntu.com/ubuntu jammy InRelease
Get:2 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Get:3 http://gb.archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]
Get:4 http://gb.archive.ubuntu.com/ubuntu jammy-backports InRelease [107 kB]
Get:5 http://security.ubuntu.com/ubuntu jammy-security/main amd64 c-n-f Metadata [8,360 B]
Get:6 http://gb.archive.ubuntu.com/ubuntu jammy-updates/main i386 Packages [436 kB]
Get:7 http://gb.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [876 kB]
Get:8 http://gb.archive.ubuntu.com/ubuntu jammy-updates/main Translation-en [193 kB]
Get:9 http://gb.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [801 kB]
Get:10 http://gb.archive.ubuntu.com/ubuntu jammy-updates/universe i386 Packages [568 kB]
Get:11 http://gb.archive.ubuntu.com/ubuntu jammy-updates/multiverse i386 Packages [3,180 B]
Get:12 http://gb.archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [9,364 B]
Fetched 3,231 kB in 3s (950 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up-to-date.

2. 执行sudo apt upgrade

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer
required:
blender blender-data fonts-cantarell fonts-dejavu fonts-dejavu-extra gdal-data hwinfo
libaec0 libarmadillo10 libarpack2 libblosc1 libcfitsio9 libcharls2 libdcmtk16
libembree3-3 libfreexl1 libfyba0 libgdal30 libgdcm3.0 libgeos-c1v5 libgeos3.10.2
libgeotiff5 libglew2.2 libhd21 libhdf4-0-alt libhdf5-103-1 libhdf5-hl-100 libjemalloc2
libjs-jquery-ui libjsoncpp25 libkmlbase1 libkmldom1 libkmlengine1 liblog4cplus-2.0.5
libmysqlclient21 libnetcdf19 libodbc2 libodbcinst2 libogdi4.1 libopencolorio1v5
libopencv-imgcodecs4.5d libopencv-videoio4.5d libopenimageio2.2 libopenshot-audio7
libopenshot19 libopenvdb8.1 libosdcpu3.4.4 libpq5 libproj22 libpugixml1v5 libqhull-r8.0
librttopo1 libsocket++1 libspatialite7 libspnav0 libsquish0 libsuperlu5 libsz2
libtinyxml2.6.2v5 liburiparser1 libx86emu3 libxerces-c3.2 libyaml-cpp0.7 mysql-common
openshot-qt proj-bin proj-data python3-openshot python3-py python3-zmq unixodbc-common
vlc-bin vlc-l10n vlc-plugin-access-extra vlc-plugin-notify vlc-plugin-qt vlc-plugin-samba
vlc-plugin-skins2 vlc-plugin-video-splitter vlc-plugin-visualization
Use 'sudo apt autoremove' to remove them.

The following security updates require Ubuntu Pro with 'esm-apps' enabled:
libimage-magick-perl imagemagick imagemagick-common libjs-jquery-ui
libopenexr25 libmagick++-6.q16-8 libmagickcore-6.q16-6-extra
libimage-magick-q16-perl libmagickwand-6.q16-6 imagemagick-6.q16
libeditorconfig0 libmagickcore-6.q16-6 imagemagick-6-common
Learn more about Ubuntu Pro at https://ubuntu.com/pro

0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.

3. 尝试清理冗余包及修复dpkg

第一次执行sudo apt autoremove时遇到错误:

[sudo] password for stephen:
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure
-a' to correct the problem.

于是执行sudo dpkg --configure -a修复:

Processing triggers for bamfdaemon (0.5.6+22.04.20220217-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for desktop-file-utils (0.26-1ubuntu3) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for doc-base (0.11.1) ...
Processing 1 removed doc-base file...
Processing triggers for gnome-menus (3.36.0-1ubuntu3) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for shared-mime-info (2.1-2) ...
Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
Processing triggers for fontconfig (2.13.1-4.2ubuntu5) ...

再次执行sudo apt autoremove,又出现新问题:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up gdal-data (3.4.1+dfsg-1build4) ...
libdvd-pkg: Checking orig.tar integrity...
/usr/src/libdvd-pkg/libdvdcss_1.4.3.orig.tar.bz2: OK
libdvd-pkg: `apt-get check` failed, you may have broken packages.
Aborting...

之后重新执行sudo apt update和sudo apt upgrade,结果还是显示所有包已更新,但有需要Ubuntu Pro的安全更新提示。

4. 尝试重新安装图形应用

我先尝试重新安装nomacs:

sudo apt-get install --reinstall nomacs
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 to upgrade, 0 to newly install, 1 reinstalled, 0 to remove and 0 not
to upgrade.
Need to get 0 B/1,237 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 372902 files and directories currently installed.)
Preparing to unpack .../nomacs_3.12.0+dfsg-3build3_amd64.deb ...
Unpacking nomacs (3.12.0+dfsg-3build3) over (3.12.0+dfsg-3build3) ...
Setting up nomacs (3.12.0+dfsg-3build3) ...
Processing triggers for bamfdaemon (0.5.6+22.04.20220217-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for desktop-file-utils (0.26-1ubuntu3) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu3) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
libdvd-pkg: Checking orig.tar integrity...
/usr/src/libdvd-pkg/libdvdcss_1.4.3.orig.tar.bz2: OK
libdvd-pkg: `apt-get check` failed, you may have broken packages.
Aborting...

尝试重新安装Totem时,也遇到了完全一样的问题。

5. 修复libdvd-pkg

我参考其他用户的解决方案,执行sudo dpkg-reconfigure libdvd-pkg:

libdvd-pkg: Checking orig.tar integrity...
/usr/src/libdvd-pkg/libdvdcss_1.4.3.orig.tar.bz2: OK
libdvd-pkg: Unpacking and configuring...
libdvd-pkg: Building the package... (it may take a while)
libdvd-pkg: Build log will be saved to
/usr/src/libdvd-pkg/libdvdcss2_1.4.3-1~local_amd64.build
Current: =ep
Bounding set
=cap_chown,cap_dac_override,cap_fowner,cap_wake_alarm,cap_block_suspend,cap_audit_read,cap_perfmon,cap_bpf,cap_checkpoint_restore
Ambient set =
Current IAB:
!cap_dac_read_search,!cap_fsetid,!cap_kill,!cap_setgid,!cap_setuid,!cap_setpcap,!cap_linux_immutable,!cap_net_bind_service,!cap_net_broadcast,!cap_net_admin,!cap_net_raw,!cap_ipc_lock,!cap_ipc_owner,!cap_sys_module,!cap_sys_rawio,!cap_sys_chroot,!cap_sys_ptrace,!cap_sys_pacct,!cap_sys_admin,!cap_sys_boot,!cap_sys_nice,!cap_sys_resource,!cap_sys_time,!cap_sys_tty_config,!cap_mknod,!cap_lease,!cap_audit_write,!cap_audit_control,!cap_setfcap,!cap_mac_override,!cap_mac_admin,!cap_syslog
Securebits: 024/0x14/5'b10100
secure-noroot: no (unlocked)
secure-no-suid-fixup: yes (unlocked)
secure-keep-caps: yes (unlocked)
secure-no-ambient-raise: no (unlocked)
uid=0(root) euid=0(root)
gid=0(root)
groups=0(root)
Guessed mode: UNCERTAIN (0)
libdvd-pkg: Installing...
(Reading database ... 372902 files and directories currently installed.)
Preparing to unpack .../libdvdcss-dev_1.4.3-1~local_amd64.deb ...
Unpacking libdvdcss-dev:amd64 (1.4.3-1~local) over (1.4.2-1~local) ...
Preparing to unpack .../libdvdcss2_1.4.3-1~local_amd64.deb ...
Unpacking libdvdcss2:amd64 (1.4.3-1~local) over (1.4.2-1~local) ...
Setting up libdvdcss2:amd64 (1.4.3-1~local) ...
Setting up libdvdcss-dev:amd64 (1.4.3-1~local) ...
Processing triggers for libc-bin (2.35-0ubuntu3.1) ...

这次重新安装nomacs时没有再出现libdvd-pkg的错误,但nomacs打开后窗口依然是黑色的... 😕

备注:内容来源于stack exchange,提问作者Stephen Lawrence

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.23 14:18:15