处理过程中遇到的错误

处理过程中遇到的错误

我知道这个问题已经被问过好几次了,但是所有建议的修复方法都对我没用。我将提供我尝试运行的一些过程的输出。

我很想得到帮助来解决这个问题。我得到了朋友的帮助,但他们无法解决这个问题,而且我已经花了超过 4 小时的时间。我非常感谢他们的帮助。

我在以下软件包中遇到此错误:
* libtxc-dxtn-s2tc0:i386
* libgl1-mesa-glx:i386

有证据表明它们是依赖性错误,但我在这方面没有取得进展。我的想法是,我有软件包
libgl1-mesa-glx:i386
libgl1-mesa-glx:amd64
,这可能会导致问题,但我毫无头绪。

我尝试发布很多可能有助于他人帮助我的内容,但如果需要更多信息,请询问。

(背景)我的联想 Legion Y520 运行 ubuntu 16.04 已有数月(自购买以来)。三天前,它没电了。昨天,当我给它充电时,它根本无法正常开机。我启动了恢复模式,但只能通过终端访问它,因为我陷入了登录问题循环。我花了一些时间,但我得到了图形驱动程序,一切(除了这个问题)都恢复正常了。在此过程中我注意到了这个问题。我 100% 确定在电池耗尽之前不是这种情况。这是我第一次收到此错误。

这里

dpkg——审计

The following packages are only half configured, probably due to problems
configuring them the first time.  The configuration should be retried using
dpkg --configure <package> or the configure menu option in dselect:
 libgl1-mesa-glx:i386 free implementation of the OpenGL API -- GLX runtime
 libtxc-dxtn-s2tc0:i386 Texture compression library for Mesa

apt-get update:工作正常

Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://us.archive.ubuntu.com/ubuntu xenial InRelease                     
Hit:3 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu xenial InRelease    
Hit:4 http://dl.google.com/linux/chrome/deb stable Release                     
Get:5 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]    
Get:6 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB]     
Hit:8 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial InRelease 
Get:9 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]  
Fetched 323 kB in 1s (212 kB/s)                              
Reading package lists... Done

apt-get clean:工作正常(无输出)

apt-get 升级:失败

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up libtxc-dxtn-s2tc0:i386 (0~git20131104-1.1) ...
update-alternatives: error: /var/lib/dpkg/alternatives/libtxc-dxtn-i386-linux-gnu corrupt: invalid status
dpkg: error processing package libtxc-dxtn-s2tc0:i386 (--configure):
 subprocess installed post-installation script returned error exit status 2
Setting up libgl1-mesa-glx:i386 (18.0.5-0ubuntu0~16.04.1) ...
update-alternatives: error: /var/lib/dpkg/alternatives/i386-linux-gnu_gl_conf corrupt: invalid status
dpkg: error processing package libgl1-mesa-glx:i386 (--configure):
 subprocess installed post-installation script returned error exit status 2
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Errors were encountered while processing:
 libtxc-dxtn-s2tc0:i386
 libgl1-mesa-glx:i386
E: Sub-process /usr/bin/dpkg returned an error code (1)

apt-get -f install:失败

Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up libtxc-dxtn-s2tc0:i386 (0~git20131104-1.1) ...
update-alternatives: error: /var/lib/dpkg/alternatives/libtxc-dxtn-i386-linux-gnu corrupt: invalid status
dpkg: error processing package libtxc-dxtn-s2tc0:i386 (--configure):
 subprocess installed post-installation script returned error exit status 2
Setting up libgl1-mesa-glx:i386 (18.0.5-0ubuntu0~16.04.1) ...
update-alternatives: error: /var/lib/dpkg/alternatives/i386-linux-gnu_gl_conf corrupt: invalid status
dpkg: error processing package libgl1-mesa-glx:i386 (--configure):
 subprocess installed post-installation script returned error exit status 2
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Errors were encountered while processing:
 libtxc-dxtn-s2tc0:i386
 libgl1-mesa-glx:i386
E: Sub-process /usr/bin/dpkg returned an error code (1)

dpkg --configure -a:成功(无输出)

这里

至于这种修复,我的情况是使用不同的包和两个包,因此我尝试调整答案:

dpkg --force-depends --purge libgl1-mesa-glx:i386:失败

    (Reading database ... 364702 files and directories currently installed.)
Removing libgl1-mesa-glx:i386 (18.0.5-0ubuntu0~16.04.1) ...
update-alternatives: error: /var/lib/dpkg/alternatives/i386-linux-gnu_gl_conf corrupt: invalid status
dpkg: error processing package libgl1-mesa-glx:i386 (--purge):
 subprocess installed pre-removal script returned error exit status 2
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Errors were encountered while processing:
 libgl1-mesa-glx:i386

dpkg --force-depends --purge libgl1-mesa-glx:i386:失败

(Reading database ... 364702 files and directories currently installed.)
Removing libgl1-mesa-glx:i386 (18.0.5-0ubuntu0~16.04.1) ...
update-alternatives: error: /var/lib/dpkg/alternatives/i386-linux-gnu_gl_conf corrupt: invalid status
dpkg: error processing package libgl1-mesa-glx:i386 (--purge):
 subprocess installed pre-removal script returned error exit status 2
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Errors were encountered while processing:
 libgl1-mesa-glx:i386

dpkg --configure libgl1-mesa-glx:i386: 失败

Setting up libgl1-mesa-glx:i386 (18.0.5-0ubuntu0~16.04.1) ...
update-alternatives: error: /var/lib/dpkg/alternatives/i386-linux-gnu_gl_conf corrupt: invalid status
dpkg: error processing package libgl1-mesa-glx:i386 (--configure):
 subprocess installed post-installation script returned error exit status 2
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Errors were encountered while processing:
 libgl1-mesa-glx:i386

答案1

我解决了我的问题。我正在发布答案,但如果有人要求,我可以删除问题 - 因为我是新手,不知道正确的做法。

这是替代方案的问题(如警告所示)。以下我能够消除这个错误。

我的步骤:
update-alternatives --remove-all libtxc-dxtn-i386-linux-gnu
rm -f /var/lib/dpkg/alternatives/libtxc-dxtn-i386-linux-gnu

update-alternatives --remove-all i386-linux-gnu_gl_conf
rm -f /etc/alternatives/i386-linux-gnu_gl_conf

之后我运行了
apt-get -f install,这是第一次成功

apt-get update失败了,但我可以调查......

相关内容