交易失败:包裹系统已损坏

交易失败:包裹系统已损坏

我运行了“软件更新程序”,然后显示:

Check if you are using third party repositories. If so disable them,
since they are a common source of problems. Furthermore run the
following command in a Terminal: apt-get install -f Transaction
failed: The package system is broken  The following packages have
unmet dependencies:

libgl1-mesa-dri: Depends: libglapi-mesa (= 22.0.1-1ubuntu2.1) but
22.1.3+git2206301758.a066287f1b5~j~mesarc0 is installed
  Depends: libsensors5 (>= 1:3.5.0) but 1:3.6.0-7ubuntu1 is installed
  Depends: zlib1g (>= 1:1.1.4) but 1:1.2.11.dfsg-2ubuntu9 is installed 
libgl1-mesa-dri:i386:
  Depends: libsensors5 (>= 1:3.5.0) but 1:3.6.0-7ubuntu1 is installed
  Depends: zlib1g (>= 1:1.1.4) but 1:1.2.11.dfsg-2ubuntu9 is installed

然后我就跑了sudo apt-get install -f

Reading package lists...Done 
Building dependency tree... Done 
Reading state information... Done 
Correcting dependencies... Done 
The following packages were automatically installed and are no longer required:   fonts-lyx fonts-mathjax ironseed-data javascript-common
libaribb24-0   libblas3 libboost-dev libboost1.74-dev libcddb2
libdc1394-25 libdecor-0-0   libdecor-0-plugin-1-cairo libdvbpsi10
libebml5 libexpat1-dev libfluidsynth3   libgfortran5 libgl1-amber-dri
libinstpatch-1.0-2 libixml10 libjs-excanvas   libjs-jquery
libjs-jquery-flot libjs-jquery-ui libjs-mathjax libjs-sphinxdoc  
libjs-underscore libkate1 liblapack3 liblbfgsb0 libllvm13
libllvm13:i386   liblua5.2-0 libmatroska7 libmikmod3 libminizip1
libmpcdec6 libmysofa1   libopenblas-dev libopenblas-pthread-dev
libopenblas0 libopenblas0-pthread   libopenmpt-modplug1 libplacebo192
libprotobuf-lite23 libproxy-tools   libpython3-dev libpython3.10-dev
libqhull-r8.0 libqt5designer5 libqt5help5   libqt5positioning5
libqt5printsupport5 libqt5quickwidgets5 libqt5sql5   libqt5sql5-sqlite
libqt5test5 libqt5webchannel5 libqt5webengine-data   libqt5webengine5
libqt5webenginecore5 libqt5webenginewidgets5   libqt5x11extras5
libqt5xml5 libre2-9 libresid-builder0c2a libsdl-image1.2  
libsdl-mixer1.2 libsdl2-2.0-0 libsidplay2 libspatialaudio0 libssh2-1  
libupnp13 libva-wayland2 libvlc-bin libvlc5 libvlccore9
libxcb-composite0   libxsimd-dev python-matplotlib-data
python3-appdirs python3-attr   python3-beniget python3-brotli
python3-bs4 python3-cycler python3-decorator   python3-dev
python3-fonttools python3-fs python3-gast python3-html5lib  
python3-jsonschema python3-kiwisolver python3-lxml python3-lz4  
python3-markdown python3-matplotlib python3-mpmath python3-numpy  
python3-packaging python3-ply python3-pyaudio python3-pygments
python3-pyqt5   python3-pyqt5.qtwebchannel python3-pyqt5.qtwebengine
python3-pyqt5.sip   python3-pyrsistent python3-pythran python3-scipy
python3-send2trash   python3-soupsieve python3-sympy python3-ufolib2
python3-unicodedata2   python3-webencodings python3.10-dev
timgm6mb-soundfont unicode-data vlc-bin   vlc-data vlc-l10n
vlc-plugin-access-extra vlc-plugin-base vlc-plugin-notify  
vlc-plugin-qt vlc-plugin-samba vlc-plugin-skins2
vlc-plugin-video-output   vlc-plugin-video-splitter
vlc-plugin-visualization zlib1g-dev
Use 'sudo apt autoremove' to remove them. 
The following additional packages will be installed:  
libgl1-mesa-dri 
The following packages will be upgraded:  
libgl1-mesa-dri 
1 upgraded, 0 newly installed, 0 to remove and 11 not upgraded. 2 not fully installed or removed. 
Need to get 7,878 kB of archives. After this operation, 12.3 kB of additional disk space will be used. 
Do you want to continue? [Y/n] Y 
Get:1 https://ppa.launchpadcontent.net/ernstp/mesarc/ubuntu jammy/main amd64
libgl1-mesa-dri amd64 22.1.3+git2206301758.a066287f1b5~j~mesarc0
[7,878 kB] Fetched 7,878 kB in 38s (205 kB/s)                         
(Reading database ... 253040 files and directories currently
installed.) Preparing to unpack
.../libgl1-mesa-dri_22.1.3+git2206301758.a066287f1b5~j~mesarc0_amd64.deb
... Unpacking libgl1-mesa-dri:amd64
(22.1.3+git2206301758.a066287f1b5~j~mesarc0) over (22.0.1-1ubuntu2.1)
... dpkg: error processing archive
/var/cache/apt/archives/libgl1-mesa-dri_22.1.3+git2206301758.a066287f1b5~j~mesarc0_amd64.deb
(--unpack):  trying to overwrite
'/usr/lib/x86_64-linux-gnu/dri/i915_dri.so', which is also in package
libgl1-amber-dri:amd64 21.3.7-0ubuntu1 Errors were encountered while
processing: 
/var/cache/apt/archives/libgl1-mesa-dri_22.1.3+git2206301758.a066287f1b5~j~mesarc0_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

之后我跑了,sudo dpkg --configure -a结果显示

dpkg: error processing package libgl1-mesa-dri:i386 (--configure): package libgl1-mesa-dri:i386 22.1.3+git2206301758.a066287f1b5~j~mesarc0 cannot be configured because libgl1-mesa-dri:amd64 is at a different version (22.0.1-1ubuntu2.1)
dpkg: dependency problems prevent configuration of libglx-mesa0:i386: 
libglx-mesa0:i386 depends on libgl1-mesa-dri; however:   Package libgl1-mesa-dri:i386 is not configured yet.

dpkg: error processing package libglx-mesa0:i386 (--configure): dependency problems - leaving unconfigured 
Errors were encountered while processing:  libgl1-mesa-dri:i386  libglx-mesa0:i386

我也尝试过一切这里除了清除之外的指南,但它仍然没有修复。

答案1

您的某个软件包配置失败,因此无法完成安装,因为其他软件包依赖于此软件包:

/var/cache/apt/archives/libgl1-mesa-dri_22.1.3+git2206301758.a066287f1b5~j~mesarc0_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

所以你必须先解决这个问题。简单的解决方案是删除它。但你也可以更深入地检查包postinstall脚本中出了什么问题,你也许可以修复它。你可以deb/var/cache/apt/archives/目录中找到包,然后这里有一些提示如何调查失败: https://serverfault.com/questions/88510/how-do-i-show-the-actions-that-installing-a-deb-package-will-take

相关内容